[FIX] mail compose message: fixed body_html on quotation, fixed reference and header computation.
bzr revid: tde@openerp.com-20120719141201-32rl7t40qhzu0ylj
This commit is contained in:
@@ -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<blockquote>%s</blockquote>' % (body_html),
|
||||
quoted_body_html = '<blockquote>%s</blockquote>' % {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 = '<br /><br />%s%s<br />%s<br />%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,
|
||||
|
||||
Reference in New Issue
Block a user