Open maneandrea opened 2 weeks ago
@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)
👍
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