Skip to content

[19.0][MIG] mass_mailing_list_dynamic: Migration to 19.0#24

Open
quoc-pn wants to merge 23 commits into
OCA:19.0from
komit-consulting:19.0-mig-mass_mailing_list_dynamic
Open

[19.0][MIG] mass_mailing_list_dynamic: Migration to 19.0#24
quoc-pn wants to merge 23 commits into
OCA:19.0from
komit-consulting:19.0-mig-mass_mailing_list_dynamic

Conversation

@quoc-pn
Copy link
Copy Markdown
Member

@quoc-pn quoc-pn commented May 7, 2026

No description provided.

yajo and others added 23 commits May 7, 2026 10:12
* [FIX+IMP] mass_mailing_list_dynamic: tests, icons, filters...

* Brand new icon
* Added feature of loading an existing filter as criteria
* Tests as SavepointCase for optimizing times
* Tests in post-install for avoiding errors on res.partner not null constraints
  when several modules added them.
* Updated documentation.
* Fix mock in test for not commiting test data.

* [FIX] mass_mailing_list_dynamic: Wasn't able to create contacts in fully synced lists

Syncing context was being set in the wrong object. Added to test too.

* [FIX] mass_mailing_list_dynamic: Allow to write back vals from res.partner

Module mass_mailing_partner writes back certain values from partner to
mass_mailing_contact. Module should allow that write operation.
- Adds is_synced field to track whether a dynamic list has unsynced
changes or not so the user is aware that the definitive number of
contacts is yet to be determined.
- It fixes an issue that made impossible deleting a res.partner filter
when a list had use it to filter contacts.
- It also shows only the filters available for the user (shared and
belonging to self).
- We change the method to hook on (it wasn't correctly overriden anyway)
to ensure the list is resynced even if no recipients are left. For
example: we create a dynamic list with a domain expecting it to sync in
the first mass_mailing. It wouldn't sync as Odoo dismisses the mailing
considering no recipients are left thus it wouldn't get into the
`send_mail` method.
[UPD] Update mass_mailing_list_dynamic.pot

[UPD] README.rst

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: social-13.0/social-13.0-mass_mailing_list_dynamic
Translate-URL: https://translation.odoo-community.org/projects/social-13-0/social-13-0-mass_mailing_list_dynamic/

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: social-13.0/social-13.0-mass_mailing_list_dynamic
Translate-URL: https://translation.odoo-community.org/projects/social-13-0/social-13-0-mass_mailing_list_dynamic/
…ontacts wizard related to dynamic and full sync list

[UPD] Update mass_mailing_list_dynamic.pot

[UPD] README.rst

mass_mailing_list_dynamic 13.0.1.0.1

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: social-13.0/social-13.0-mass_mailing_list_dynamic
Translate-URL: https://translation.odoo-community.org/projects/social-13-0/social-13-0-mass_mailing_list_dynamic/
… synced contacts

The previous implementation in `mass_mailing_partner` overwrote `create()` and `write()` in a way that always updated all fields.

However, `mass_mailing_list_dynamic` added a constraint on 4 fields, called `_check_no_manual_edits_on_fully_synced_lists()`.

The combination of these 2 things made that constraint to be checked *always*, regardless on which fields were being updated.

Thus, when sending a mass mailing based on a fully synced list, and processing bounces, we would get errors always. Even when the `message_bounce` field shouldn't be constrained.

@moduon MT-8513
A dynamic mailing list syncing could have errors due to constraints or
other side effects. But as the syncing is being made by the cron job,
the user can't detect and fix (or report) those errors.

So we'll just sync the lists when the user launches the mailing and
prior to put it in the mailing queue.

MT-9835
Now there is only 1 ORM operation per list and 1 global unlink of garbage
contacts at the end.

@moduon MT-13677
@quoc-pn quoc-pn force-pushed the 19.0-mig-mass_mailing_list_dynamic branch from c3e5a96 to bfc7853 Compare May 7, 2026 04:52
@quoc-pn quoc-pn marked this pull request as ready for review May 7, 2026 04:55
@quoc-pn quoc-pn mentioned this pull request May 7, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.