[16.0][FIX]mail_activity_done: Fix counters and activity_state search#1507
[16.0][FIX]mail_activity_done: Fix counters and activity_state search#1507OCA-git-bot merged 1 commit intoOCA:16.0from
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 |
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.
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 |
StefanRijnhart
left a comment
There was a problem hiding this comment.
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:
|
StefanRijnhart
left a comment
There was a problem hiding this comment.
Thanks for the updates!
/ocabot merge minor
|
What a great day to merge this nice PR. Let's do it! |
|
Congratulations, your PR was merged at 2c622c1. Thanks a lot for contributing to OCA. ❤️ |
This PR includes 2 changes:
and mail_activity.done=Falseto WHERE clause in the query to allow properly search by this field.Fixes: #1327 CC: @gurneyalex @navarrorico