From 7e748858cd91cf8c4d6d287b320307671d3c1ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 19 Jul 2012 16:12:01 +0200 Subject: [PATCH] [FIX] mail compose message: fixed body_html on quotation, fixed reference and header computation. bzr revid: tde@openerp.com-20120719141201-32rl7t40qhzu0ylj --- addons/mail/wizard/mail_compose_message.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index c8ce25def0b..eea3a7eb46f 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -200,9 +200,9 @@ class mail_compose_message(osv.TransientModel): body_text = message_data.body_text or '' body_html = message_data.body_html or '' quoted_body_text = '> %s' % tools.ustr(body_text.replace('\n', "\n> ") or '') - quoted_body_html = '\n
%s
' % (body_html), + quoted_body_html = '
%s
' % {tools.ustr(body_html)}, reply_body_text = '\n%s%s\n%s\n%s' % (sent_date, sender, quoted_body_text, current_user.signature) - reply_body_html = '\n%s%s\n%s\n%s' % (sent_date, sender, quoted_body_html, current_user.signature) + reply_body_html = '

%s%s
%s
%s' % (sent_date, sender, quoted_body_html, current_user.signature) # form dest_partner_ids dest_partner_ids = [partner.id for partner in message_data.partner_ids] # Update header and references @@ -210,12 +210,12 @@ class mail_compose_message(osv.TransientModel): reply_references = message_data.references and tools.ustr(message_data.references) or False reply_message_id = message_data.message_id or False if reply_message_id: - reply_references = (reply_references or '') + " " + mail_wiz.message_id - reply_headers['In-Reply-To'] = mail_wiz.message_id + reply_references = (reply_references or '') + " " + message_data.message_id + reply_headers['In-Reply-To'] = message_data.message_id # update the result result.update({ 'body_text': reply_body_text, - 'body_html': quoted_body_html, + 'body_html': reply_body_html, 'subject': reply_subject, 'attachment_ids': [], 'dest_partner_ids': dest_partner_ids,