summaryrefslogtreecommitdiff
path: root/addons/mail/models/mail_thread.py
diff options
context:
space:
mode:
authorDavid Beguin <dbe@odoo.com>2018-10-26 12:47:27 +0000
committerDavid Beguin <dbe@odoo.com>2018-11-20 11:37:05 +0000
commitfc2a8d63ee09053f12493683400ec424cab8ce16 (patch)
treedd01ccecc2982d25c46cb12a19fd601be8c8c420 /addons/mail/models/mail_thread.py
parent0fe50a01d2d4969f2a4cf85c36c2884407ccc682 (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.py2
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: