[IMP] mail: rename body to body_text in msg_dict too, for consistency, correct typo
bzr revid: odo@openerp.com-20110722182307-nwrero6fvczq1ukb
This commit is contained in:
parent
c996efa2fe
commit
d48876e59c
|
@ -314,7 +314,7 @@ class mail_message(osv.osv):
|
|||
#.. all X- headers...
|
||||
},
|
||||
'subtype': msg_mime_subtype,
|
||||
'body': plaintext_body
|
||||
'body_text': plaintext_body
|
||||
'body_html': html_body,
|
||||
'attachments': { 'file1': 'bytes',
|
||||
'file2': 'bytes' }
|
||||
|
@ -391,7 +391,7 @@ class mail_message(osv.osv):
|
|||
body = tools.html2plaintext(body)
|
||||
else:
|
||||
msg['subtype'] = 'plain'
|
||||
msg['body'] = tools.ustr(body, encoding)
|
||||
msg['body_text'] = tools.ustr(body, encoding)
|
||||
|
||||
attachments = {}
|
||||
if msg_txt.is_multipart() or 'multipart/alternative' in msg.get('content-type', ''):
|
||||
|
@ -423,7 +423,7 @@ class mail_message(osv.osv):
|
|||
res = part.get_payload(decode=True)
|
||||
body += tools.ustr(res, encoding)
|
||||
|
||||
msg['body'] = body
|
||||
msg['body_text'] = body
|
||||
msg['attachments'] = attachments
|
||||
return msg
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ class mail_thread(osv.osv):
|
|||
"""
|
||||
return self.history(cr, uid, ids,
|
||||
subject = msg_dict.get('subject'),
|
||||
body_text = msg_dict.get('body'),
|
||||
body_text = msg_dict.get('body_text'),
|
||||
email_to = msg_dict.get('to'),
|
||||
email_from = msg_dict.get('from'),
|
||||
email_cc = msg_dict.get('cc'),
|
||||
|
@ -159,7 +159,7 @@ class mail_thread(osv.osv):
|
|||
message_id = msg_dict.get('message-id'),
|
||||
references = msg_dict.get('references')\
|
||||
or msg_dict.get('in-reply-to'),
|
||||
attachments = attachments,
|
||||
attachments = msg_dict.get('attachments'),
|
||||
body_html= msg_dict.get('body_html'),
|
||||
subtype = msg_dict.get('subtype'),
|
||||
headers = msg_dict.get('headers'),
|
||||
|
|
Loading…
Reference in New Issue