[Fix]: mail_gateway : Fix fetch attachement even if the check box add attachement is not checked

bzr revid: sbh@tinyerp.com-20110616123436-tclirmg6vju75i1j
This commit is contained in:
Bhumika (OpenERP) 2011-06-16 18:04:36 +05:30
parent a8e1dee41c
commit f2c41053ea
1 changed files with 1 additions and 1 deletions

View File

@ -519,7 +519,7 @@ class mailgate_tool(osv.osv_memory):
body = content
has_plain_text = True
elif part.get_content_maintype() in ('application', 'image'):
if filename :
if filename and attach:
attachments[filename] = part.get_payload(decode=True)
else:
res = part.get_payload(decode=True)