-
-
Notifications
You must be signed in to change notification settings - Fork 640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0][FIX]mail_activity_done: Fix counters and activity_state search #1507
base: 16.0
Are you sure you want to change the base?
Conversation
ea4838f
to
df64eed
Compare
Fixed tests. |
df64eed
to
9ab7f24
Compare
I have detected a new bug, the _read_progress_bar inherit was not properly working and the count of activities in the kanban view was wrong. We should modify the subquery where clause |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like you'll have to update the test too - I think it's correct to expect a 0 here
1f68c55
to
1f6bc04
Compare
Seems a problem with the tests because the function executes the query directly. Testing in shell, if i make the commit after the _action_done, the result is 0. It also happens in the test_activity_state_search. I changed the tests to move the second activity to demo file, assigned to another partner, and created already done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Sounds like your test issues could perhaps have been solved with a flush_recordset
on the activity.
Do you want to squash your commits in one or maybe two commits? I already picked what remains valid in 18.0 in OCA/mail#31
1f6bc04
to
4da6a2e
Compare
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, the tests now depend on the demo data. This is against the current grain of making tests less dependent on demo data. The tests are also more reliable if they are for a newly created user. Otherwise, the tests could fail because of demo activities from unrelated modules, or previous activity on a reused database. Can you bring back the test user?
In odoo 16 the systray_get_activities function uses the ORM, there is no need to override it. Also fixes the activity count in kanban views.
4da6a2e
to
f1fffe2
Compare
I made some changes in tests:
|
This PR includes 2 changes:
and mail_activity.done=False
to WHERE clause in the query to allow properly search by this field.Fixes: #1327 CC: @gurneyalex @navarrorico