From 06e5122a07924a8971c5161aa3c2264f1197399f Mon Sep 17 00:00:00 2001 From: "Nimesh (Open ERP)" Date: Fri, 17 Feb 2012 19:28:24 +0530 Subject: [PATCH] [FIX] : for outlook msg_body is blank so put condion for that outherwise it does not gives error while converting to html to plaintext bzr revid: nco@tinyerp.com-20120217135824-3ewo9lt8f48mwpkn --- addons/mail/mail_message.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 1693397f6fa..117bae1a742 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -417,7 +417,8 @@ class mail_message(osv.osv): if 'text/html' in msg.get('content-type', ''): msg['body_html'] = body msg['subtype'] = 'html' - body = tools.html2plaintext(body) + if msg['body_html']!='': + body = tools.html2plaintext(body) msg['body_text'] = tools.ustr(body, encoding) attachments = []