[FIX] email_template :- decode the attachment data and then send email.

bzr revid: ysa@tinyerp.com-20110215121429-0e3yfyxs8xvjhvax
This commit is contained in:
Yogesh (OpenERP)
2011-02-15 17:44:29 +05:30
parent 8a7e0e4670
commit d9f65e1384
+2 -2
View File
@@ -24,7 +24,7 @@ from osv import fields
from tools.translate import _
import tools
import netsvc
import base64
import time
#import binascii
#import email
@@ -315,7 +315,7 @@ class email_message(osv.osv):
try:
attachments = []
for attach in message.attachment_ids:
attachments.append((attach.datas_fname ,attach.datas))
attachments.append((attach.datas_fname ,base64.b64decode(attach.datas)))
smtp_server = message.smtp_server_id
if not smtp_server:
smtp_ids = smtp_server_obj.search(cr, uid, [('default','=',True)])