Skip to content

[19.0][MIG] mass_mailing_partner#20

Merged
OCA-git-bot merged 43 commits into
OCA:19.0from
c4a8-odoo:19.0-mig-mass_mailing_partner
Apr 16, 2026
Merged

[19.0][MIG] mass_mailing_partner#20
OCA-git-bot merged 43 commits into
OCA:19.0from
c4a8-odoo:19.0-mig-mass_mailing_partner

Conversation

@CRogos
Copy link
Copy Markdown

@CRogos CRogos commented Mar 27, 2026

No description provided.

Javier Iniesta and others added 30 commits March 27, 2026 09:49
[IMP] mass_mailing_partner: Link mail statistics to partner
* Exclude opt_out.

  Now opted-out records will not be counted in the "Mailing lists" smart button
  in the partner form.

* Avoid duplicate error.

  By indicating the exact `partner_id` and ensuring no contacts associated to it are found, you avoid possible duplication errors when several partners share the same name or email.
Without this patch, users without access to reading and editing mass mailing contact records are now unable to change a partner's name or email. They'd recieve an exception such as:

    AccessError: Sorry, you are not allowed to access this document. Only users with the following access level are currently allowed to do that:
    - Mass Mailing/User

    (Document model: mail.mass_mailing.contact)

Restrictive ACLs shouldn't restrict normal user operation nor DB consistency, so using sudo mode now and testing behavior.
* [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.
- In DB which use large amounts of records and intesive use of
mass_mailings, not optimized compute records lead to a drastical
decrease of performance
For each partner, if already has a contact it's added to the selected
list, otherwise a new one is created
…ption.

Before, on the backend if you check the `opt_out` checkbox and saving on a `mailing.contact`, the entire row (`mailing.contact.subscription`) would be unlinked.  Combined with `mass_mailing_list_dynamic` this means the contact would just be re-subscribed over and over.

After, check `opt_out` will fill `unsubscription_date` and the row will stay.  Tests in `mass_mailing_list_dynamic` pass.
It doesn't make sense and even more, it crashed.

Fixes #644
…essage + Add test related to write with multi-partner + Add sudo() to prevent user without mailing access try to merge contacts
Before this commit, the buttons are displayed incorrectly in mobile dropdown buttons menu
[FIX] super(Class, self) changed to super() in mass_mailing_partners
Currently translated at 32.1% (9 of 28 strings)

Translation: social-16.0/social-16.0-mass_mailing_partner
Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mass_mailing_partner/it/
Currently translated at 32.1% (9 of 28 strings)

Translation: social-16.0/social-16.0-mass_mailing_partner
Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mass_mailing_partner/sl/
Currently translated at 32.1% (9 of 28 strings)

Translation: social-16.0/social-16.0-mass_mailing_partner
Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mass_mailing_partner/it/
Currently translated at 100.0% (29 of 29 strings)

Translation: social-16.0/social-16.0-mass_mailing_partner
Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mass_mailing_partner/es/
Currently translated at 100.0% (28 of 28 strings)

Translation: social-16.0/social-16.0-mass_mailing_partner
Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mass_mailing_partner/it/
kevinkhao and others added 8 commits March 27, 2026 14:17
Currently translated at 100.0% (28 of 28 strings)

Translation: mass-mailing-18.0/mass-mailing-18.0-mass_mailing_partner
Translate-URL: https://translation.odoo-community.org/projects/mass-mailing-18-0/mass-mailing-18-0-mass_mailing_partner/es/
Currently translated at 67.8% (19 of 28 strings)

Translation: mass-mailing-18.0/mass-mailing-18.0-mass_mailing_partner
Translate-URL: https://translation.odoo-community.org/projects/mass-mailing-18-0/mass-mailing-18-0-mass_mailing_partner/fr/
Odoo 18 allows setting mass mailing contacts with split first/last names.

With this change, the module behavior is consistent when that setting is enabled. Those fields will be readonly if the contact name is synced from the partner, just like it was already happening with the `name` field.

@moduon MT-13398
… 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
Currently translated at 100.0% (28 of 28 strings)

Translation: mass-mailing-18.0/mass-mailing-18.0-mass_mailing_partner
Translate-URL: https://translation.odoo-community.org/projects/mass-mailing-18-0/mass-mailing-18-0-mass_mailing_partner/de/
…il address

There should be no restrictions (similar to what happens when multiple mailing contacts are created with the same email address without this module installed).

TT61525
@CRogos CRogos force-pushed the 19.0-mig-mass_mailing_partner branch from c112b05 to e9bc901 Compare March 27, 2026 14:17
@CRogos CRogos force-pushed the 19.0-mig-mass_mailing_partner branch from e9bc901 to dc649c5 Compare March 27, 2026 14:26
Copy link
Copy Markdown

@AEstLo AEstLo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review (LGTM)

Copy link
Copy Markdown

@thomashaunschmid86 thomashaunschmid86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@CRogos CRogos force-pushed the 19.0-mig-mass_mailing_partner branch from dc649c5 to 965fad2 Compare April 16, 2026 07:50
@OCA-git-bot OCA-git-bot added series:19.0 mod:mass_mailing_partner_title Module mass_mailing_partner_title mod:mass_mailing_partner Module mass_mailing_partner labels Apr 16, 2026
@CRogos
Copy link
Copy Markdown
Author

CRogos commented Apr 16, 2026

@pedrobaeza merge?

@pedrobaeza
Copy link
Copy Markdown
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 19.0-ocabot-merge-pr-20-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit de37b6e into OCA:19.0 Apr 16, 2026
7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 07bb357. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.