[18.0][MIG] mail_activity_done: Migration to 18.0#31
Conversation
12447aa to
9e8cb5c
Compare
9e8cb5c to
eedfe64
Compare
eedfe64 to
550e961
Compare
have been completed. fixup moment js fixup
Changed property in test to a correct one Changed README Added necessary checks if module does not have an icon Added default value to _original_module
Currently translated at 100.0% (15 of 15 strings) Translation: social-16.0/social-16.0-mail_activity_done Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_activity_done/es/
Currently translated at 100.0% (15 of 15 strings) Translation: social-16.0/social-16.0-mail_activity_done Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_activity_done/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: social-17.0/social-17.0-mail_activity_done Translate-URL: https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_activity_done/
550e961 to
4338c9c
Compare
|
@Bart-dh Ooooh, nice find! I'll check if there is remaining functionality to keep, and if migration is required for done activities from earlier versions. |
03580ba to
1bf6bdb
Compare
| _set_keep_done(cr) | ||
| cr.execute( | ||
| """ | ||
| delete from mail_activity where active is not true and done is not true; |
There was a problem hiding this comment.
this one is unexpected for me, what's your rationale here?
There was a problem hiding this comment.
All archived activites are considered done in Odoo 18: https://github.com/odoo/odoo/blob/44e61c6/addons/mail/models/mail_activity.py#L154
There was a problem hiding this comment.
yes but we're migrating the module that people install to keep activities, so I'd not expect its migration to delete anything. I'd expect the migration script to set active to False where done is True (even though the v17 code of this module should have set this in the first place)
There was a problem hiding this comment.
True, handling done activities that are still active is another inconsistency that might need handling. As for the other case, I downgraded that to a warning.
1bf6bdb to
2534fbe
Compare
The functionality is now supported by Odoo, using a similar datamodel: to mark activities done, they are archived instead of unlinked. This is reflected in the way that the state field is computed.
2534fbe to
8b1ad5d
Compare
|
This PR has the |
|
/ocabot merge nobump |
|
This PR looks fantastic, let's merge it! |
|
Congratulations, your PR was merged at 7ec8ce2. Thanks a lot for contributing to OCA. ❤️ |

Continued from #17
The functionality is now supported by Odoo, using a similar datamodel: to mark activities done, they are archived instead of unlinked. This is reflected in the way that the state field is computed.
We can keep this module to ensure that all activity types default to keeping done activities (which is not the case in Odoo). Otherwise, the migration script will also clear archived activities that were not done, to prevent them from showing up as 'done' in Odoo 18.