diff options
| author | uco (OpenERP) <uco@tinyerp.com> | 2010-12-06 18:41:02 +0530 |
|---|---|---|
| committer | uco (OpenERP) <uco@tinyerp.com> | 2010-12-06 18:41:02 +0530 |
| commit | b1cf433ecc01a58c8abe27fdf9dbaba2deedf7f5 (patch) | |
| tree | 7d4b2df75b76c3529854cf98c401ad59370ce00a /addons/mail_gateway/mail_gateway.py | |
| parent | eb04af83f31615e220a1b5e9639e799eb88242d6 (diff) | |
| parent | 5350ab0c1930e6573ee52bd430bb1d0f5adea2a3 (diff) | |
[MERGE]: Merged with trunk-addons.
bzr revid: uco@tinyerp.com-20101206131102-z2xzz8eshkswo00q
Diffstat (limited to 'addons/mail_gateway/mail_gateway.py')
| -rw-r--r-- | addons/mail_gateway/mail_gateway.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/mail_gateway/mail_gateway.py b/addons/mail_gateway/mail_gateway.py index a5d48956b1a..e1ef873275f 100644 --- a/addons/mail_gateway/mail_gateway.py +++ b/addons/mail_gateway/mail_gateway.py @@ -200,7 +200,8 @@ class mailgate_message(osv.osv): action_data = action_pool.read(cr, uid, action_ids[0], context=context) action_data.update({ 'domain' : "[('id','=',%d)]"%(res_id), - 'nodestroy': True + 'nodestroy': True, + 'context': {} }) return action_data @@ -486,6 +487,8 @@ class mailgate_tool(osv.osv_memory): if not msg_txt.is_multipart() or 'text/plain' in msg.get('Content-Type', ''): encoding = msg_txt.get_content_charset() body = msg_txt.get_payload(decode=True) + if 'text/html' in msg_txt.get('Content-Type', ''): + body = tools.html2plaintext(body) msg['body'] = tools.ustr(body, encoding) attachments = {} @@ -566,6 +569,7 @@ class mailgate_tool(osv.osv_memory): message_id = msg.get('message-id'), references = msg.get('references', False) or msg.get('in-reply-to', False), attach = attachments.items(), + email_date = msg.get('date'), context = context) else: self.history(cr, uid, model, res_ids, msg, attachment_ids, context=context) |
