[19.0][MIG] mail_cleanup: Migration to 19.0#3618
Open
dnplkndll wants to merge 26 commits into
Open
Conversation
* Add new module "mail_cleanup" in order to move/mark as read old messages * Use correct Model + remove unnecessary conditions/assignments * Add purging mechanism + cleanup is by default inactive * Add new field + new info in README * Correct type for purge_days + better checks * Place expunge() call after parsing all messages * Migration to 9.0 of mail_cleanup * Fix README.rst * Add __init__.py * Fix error with multi mail servers * Correct syntax for methods + use datetime.date.today
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-tools-14.0/server-tools-14.0-mail_cleanup Translate-URL: https://translation.odoo-community.org/projects/server-tools-14-0/server-tools-14-0-mail_cleanup/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-tools-18.0/server-tools-18.0-mail_cleanup Translate-URL: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-mail_cleanup/
Currently translated at 100.0% (8 of 8 strings) Translation: server-tools-18.0/server-tools-18.0-mail_cleanup Translate-URL: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-mail_cleanup/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-tools-18.0/server-tools-18.0-mail_cleanup Translate-URL: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-mail_cleanup/
Currently translated at 100.0% (9 of 9 strings) Translation: server-tools-18.0/server-tools-18.0-mail_cleanup Translate-URL: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-mail_cleanup/it/
a27b729 to
6c6614d
Compare
Contributor
Author
6c6614d to
45c8196
Compare
leemannd
approved these changes
May 21, 2026
Contributor
leemannd
left a comment
There was a problem hiding this comment.
Some bot commits should be squashed.
Unless that the code seems good.
Thanks for the unit test 👍
…n states SELECTED
Signed-off-by: Don Kendall <dkendall@ledoweb.com>
Signed-off-by: Don Kendall <dkendall@ledoweb.com>
45c8196 to
a96f6a1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port of
mail_cleanupfrom 18.0 to 19.0. Follows the OCA migration guide.Non-mechanical adaptations worth flagging:
fetchmail.server.connect()was renamed to_connect__()in Odoo 19 (and made internal); module callsite updated.fetch_mail(raise_exception=True)(now a thin access-check wrapper in core) to_fetch_mail(batch_limit=50)(the actual worker).tests/directory in 18.0 (and earlier). 7 tests now cover field declaration, server_environment integration, both cleanup branches, the no-folder branch, the IMAP/POP server-type gate, and the orchestration flow.