Skip to content
Snippets Groups Projects
Commit 34f567dd authored by Christophe Simonis's avatar Christophe Simonis
Browse files

Revert "[FIX] mass_mailing: unsubscribe not working in multi lang"

commit a3ab33f2 introduced invalid code
parent 919a1af9
No related branches found
No related tags found
No related merge requests found
......@@ -99,9 +99,9 @@ class MailMail(osv.Model):
emails = tools.email_split(res.get('email_to')[0])
email_to = emails and emails[0] or False
unsubscribe_url= self._get_unsubscribe_url(cr, uid, mail, email_to, context=context)
regex_link_to_replace = re.escape(base_url) + '(/[a-z]{2}_[A-Z]{2})?' + '/unsubscribe_from_list'
link_to_replace = base_url+'/unsubscribe_from_list'
if link_to_replace in res['body']:
res['body'] = res['body'].replace(regex_link_to_replace, unsubscribe_url if unsubscribe_url else '#')
res['body'] = res['body'].replace(link_to_replace, unsubscribe_url if unsubscribe_url else '#')
return res
def _postprocess_sent_message(self, cr, uid, mail, context=None, mail_sent=True):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment