diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2016-08-18 08:22:29 +0200 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2016-08-18 08:31:24 +0200 |
| commit | 06fdc2a6deff12c999b285ffedba045c90c11f8a (patch) | |
| tree | 48f329b22ab8e863b8e6d22e01d5aacedb482b4f | |
| parent | 037a152db64f6dbdfbd89268f534a4e3bc022b23 (diff) | |
[FIX] mass_mailing: body editor with translation
Since a324b22d, the mass mailing body editor would:
- save english body in language Y if user had language Y,
- not allow to edit translations in another language
This is due to how html_translate is set as translation function of html
only if the field is set as sanitize==True.
closes #13196
opw-685629
| -rw-r--r-- | addons/mass_mailing/models/mass_mailing.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/mass_mailing/models/mass_mailing.py b/addons/mass_mailing/models/mass_mailing.py index 6c92e116689..b94b387a0ca 100644 --- a/addons/mass_mailing/models/mass_mailing.py +++ b/addons/mass_mailing/models/mass_mailing.py @@ -9,6 +9,7 @@ from openerp import SUPERUSER_ID from openerp.exceptions import UserError from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT from openerp.tools.safe_eval import safe_eval as eval +from openerp.tools.translate import html_translate from openerp.osv import osv, fields @@ -478,7 +479,7 @@ class MassMailing(osv.Model): 'create_date': fields.datetime('Creation Date'), 'sent_date': fields.datetime('Sent Date', oldname='date', copy=False), 'schedule_date': fields.datetime('Schedule in the Future'), - 'body_html': fields.html('Body', translate=True, sanitize=False), + 'body_html': fields.html('Body', translate=html_translate, sanitize=False), 'attachment_ids': fields.many2many( 'ir.attachment', 'mass_mailing_ir_attachments_rel', 'mass_mailing_id', 'attachment_id', 'Attachments' |
