[19.0][MIG] mass_mailing_partner#20
Merged
Merged
Conversation
[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
…loop not on self but partner
…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.
…mailing contacts)
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/
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
c112b05 to
e9bc901
Compare
e9bc901 to
dc649c5
Compare
Contributor
|
This PR has the |
dc649c5 to
965fad2
Compare
Author
|
@pedrobaeza merge? |
Member
|
/ocabot merge nobump |
Contributor
|
This PR looks fantastic, let's merge it! |
Contributor
|
Congratulations, your PR was merged at 07bb357. Thanks a lot for contributing to OCA. ❤️ |
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.
No description provided.