diff options
| author | Aurélien Warnon <awa@odoo.com> | 2020-10-29 15:27:47 +0000 |
|---|---|---|
| committer | Aurélien Warnon <awa@odoo.com> | 2020-10-30 10:37:29 +0000 |
| commit | f7795f85ed66fcebaf8a96bf4e550b069fcf1e83 (patch) | |
| tree | 692e8983a6df476ec8a1d29f3f886777e33eded0 /addons/mrp | |
| parent | 4827b0add7ff62711553f9639ed88c26788fa3d9 (diff) | |
[FIX] website_slides: fix archive/unarchive slide.channel behavior
PURPOSE
This commit fixes the behavior of archiving and un-archiving slide.channels.
SPECS
When archiving a slide.channel, you could run into an issue where the
associated slide.channel.partners would be marked as "completed" even though
the related slides were NOT completed by the user.
This happened because when computing the completion, it's searching for
slide.slide.partners marked as completed, and then comparing it with the count
of slide.slides in the channel, which would always return 0 since all slides
are archived when the channel is archived.
Marking channels as completed when they should not triggers undesired
side-effects (karma increase, completion email sent, ...).
Now, when the slide.channel is not active, we don't mark associated
slide.channel.partners as completed anymore.
The ordering in which we archive channel and slides was also altered, see
method docstring of 'slide.channel#toggle_active' for more info.
A new test ensures the correct behavior of archiving.
LINKS
Task 2170708
closes odoo/odoo#61003
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/mrp')
0 files changed, 0 insertions, 0 deletions
