[FIX] mass_mailing: fixed issue when generating unsubscirbe urlé
bzr revid: tde@openerp.com-20140415160743-5i0pjieo4o031ico
This commit is contained in:
parent
f7d7e34467
commit
c5627c4d3f
|
@ -83,8 +83,8 @@ class MailMail(osv.Model):
|
|||
|
||||
def send_get_email_dict(self, cr, uid, mail, partner=None, context=None):
|
||||
res = super(MailMail, self).send_get_email_dict(cr, uid, mail, partner, context=context)
|
||||
if mail.mailing_id and res.get('body'):
|
||||
email_to = tools.email_split(res.get('email_to'))
|
||||
if mail.mailing_id and res.get('body') and res.get('email_to'):
|
||||
email_to = tools.email_split(res.get('email_to')[0])
|
||||
unsubscribe_url = self._get_unsubscribe_url(cr, uid, mail, email_to, context=context)
|
||||
if unsubscribe_url:
|
||||
res['body'] = tools.append_content_to_html(res['body'], unsubscribe_url, plaintext=False, container_tag='p')
|
||||
|
|
Loading…
Reference in New Issue