Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] mass_mailing_partner: Migration to 18.0 #1549

Open
wants to merge 37 commits into
base: 18.0
Choose a base branch
from

Conversation

kevinkhao
Copy link

No description provided.

Javier Iniesta and others added 30 commits January 21, 2025 09:39
[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 OCA#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/
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.