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

[FIX] mass_mailing: make recipients unique by email #604

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

maneandrea
Copy link

This commit makes the recipients of any mass.mailing res_model unique by email. The email can be read from either the email field or the partner_id.email field, if they exist, otherwise the behavior is as usual.

The partner_id case requires a further loop of deduplication because partner_id.email is not stored in sale.order and read_group does not allow fetching indirect fields.

Related: https://gitlab.com/ircanada/ircodoo/-/issues/2849


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@maneandrea
Copy link
Author

@moylop260 Can you review?

The res.partner case required a further loop of deduplication because read_group does not allow indirect fields as group (such as partner_id.email) nor it allows them as aggregators (which would have also helped)

@moylop260
Copy link

👍

This commit makes the recipients of any mass.mailing res_model unique by email. The email can be read from either the email field or the partner_id.email field, if they exist, otherwise the behavior is as usual.

The partner_id case requires a further loop of deduplication because partner_id.email is not stored in sale.order and read_group does not allow fetching indirect fields.

Related: https://gitlab.com/ircanada/ircodoo/-/issues/2849
@maneandrea maneandrea force-pushed the 16.0-mass_mailing-make_recipients_unique-andrea branch from a40852f to ef73cf2 Compare September 18, 2024 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants