[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:
parent
267ab22d00
commit
43482d2d1e
|
@ -1088,3 +1088,9 @@ msgstr ""
|
||||||
msgid "your email..."
|
msgid "your email..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: mass_mailing
|
||||||
|
#: code:addons/mass_mailing/models/mail_mail.py:72
|
||||||
|
#, python-format
|
||||||
|
msgid "Click to unsubscribe"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
import urlparse
|
import urlparse
|
||||||
import werkzeug.urls
|
import werkzeug.urls
|
||||||
|
|
||||||
|
from openerp.tools.translate import _
|
||||||
from openerp import tools
|
from openerp import tools
|
||||||
from openerp import SUPERUSER_ID
|
from openerp import SUPERUSER_ID
|
||||||
from openerp.osv import osv, fields
|
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})
|
'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):
|
def send_get_mail_body(self, cr, uid, mail, partner=None, context=None):
|
||||||
""" Override to add the tracking URL to the body. """
|
""" Override to add the tracking URL to the body. """
|
||||||
|
|
Loading…
Reference in New Issue