[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
This commit is contained in:
Nimesh (Open ERP)
2012-02-17 19:28:24 +05:30
parent 329184f7dc
commit 06e5122a07
+2 -1
View File
@@ -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 = []