diff options
| author | David Beguin <dbe@odoo.com> | 2018-10-26 12:47:27 +0000 |
|---|---|---|
| committer | David Beguin <dbe@odoo.com> | 2018-11-20 11:37:05 +0000 |
| commit | fc2a8d63ee09053f12493683400ec424cab8ce16 (patch) | |
| tree | dd01ccecc2982d25c46cb12a19fd601be8c8c420 /addons/mail/models/mail_thread.py | |
| parent | 0fe50a01d2d4969f2a4cf85c36c2884407ccc682 (diff) | |
[IMP] mail, mass_mailing, mass_mailing_crm : Use normalized email in unsubscribe link
Use the email_normalized from mail.address.mixin if available to get always
a normalized email address in the unsubscribe link. That allows to simplify
the search on email address in the controllers -> Check blacklist,
send feedback, etc..
Task ID 1896677
Diffstat (limited to 'addons/mail/models/mail_thread.py')
| -rw-r--r-- | addons/mail/models/mail_thread.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py index a4feb61b3fb..3149780e926 100644 --- a/addons/mail/models/mail_thread.py +++ b/addons/mail/models/mail_thread.py @@ -1695,6 +1695,8 @@ class MailThread(models.AbstractModel): recipient_ids, email_to, email_cc = set(), False, False if 'partner_id' in self._fields and record.partner_id: recipient_ids.add(record.partner_id.id) + elif 'email_normalized' in self._fields and record.email_normalized: + email_to = record.email_normalized elif 'email_from' in self._fields and record.email_from: email_to = record.email_from elif 'partner_email' in self._fields and record.partner_email: |
