[FIX] mass_mailing: translatable unsubscribe link

Display the unsubscribe link in the language of the user

Closes #9995, opw 659075
This commit is contained in:
Jonathan Nemry (ACSONE)
2015-12-10 14:30:18 +01:00
committed by Martin Trigaux
parent 267ab22d00
commit 43482d2d1e
2 changed files with 8 additions and 1 deletions
@@ -1088,3 +1088,9 @@ msgstr ""
msgid "your email..."
msgstr ""
#. module: mass_mailing
#: code:addons/mass_mailing/models/mail_mail.py:72
#, python-format
msgid "Click to unsubscribe"
msgstr ""
+2 -1
View File
@@ -22,6 +22,7 @@
import urlparse
import werkzeug.urls
from openerp.tools.translate import _
from openerp import tools
from openerp import SUPERUSER_ID
from openerp.osv import osv, fields
@@ -68,7 +69,7 @@ class MailMail(osv.Model):
'params': werkzeug.url_encode({'db': cr.dbname, 'res_id': mail.res_id, 'email': email_to})
}
)
return '<small><a href="%s">%s</a></small>' % (url, msg or 'Click to unsubscribe')
return '<small><a href="%s">%s</a></small>' % (url, msg or _('Click to unsubscribe'))
def send_get_mail_body(self, cr, uid, mail, partner=None, context=None):
""" Override to add the tracking URL to the body. """