From b2d6c8056991c3a2ef2085dcde87a2a1018f0181 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 12 Apr 2013 15:22:31 +0200 Subject: [PATCH] [IMP] mail/wizard/mail_compose_message.py: add comment explaining why we use a text field for the body bzr revid: chs@openerp.com-20130412132231-84wz56s2r4ordxw1 --- addons/mail/wizard/mail_compose_message.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index 16cfc99c513..3a12920c951 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -116,6 +116,12 @@ class mail_compose_message(osv.TransientModel): 'mail_compose_message_ir_attachments_rel', 'wizard_id', 'attachment_id', 'Attachments'), 'filter_id': fields.many2one('ir.filters', 'Filters'), + + # Replace `body` with a text field because html fields are sanitized + # just before saving data into the database. This cause the + # sanitization of the templated messages (for mass mailing messages) + # before the rendering, forbidding the use of templated html links. + # The html of the message will be sanitized by message_post() 'body': fields.text('Contents'), }