From 04f0a3f50fbb08086f28fbbe796d3201fb65320f Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Wed, 12 Sep 2012 11:28:27 +0530 Subject: [PATCH] [IMP]thunderbird add attachment bzr revid: pna@tinyerp.com-20120912055827-tc5dt2ahfstz47ma --- addons/mail/mail_thread.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index c0d6ac90fe6..59bdf8f36c6 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -584,6 +584,7 @@ class mail_thread(osv.AbstractModel): if isinstance(thread_id, (list, tuple)): thread_id = thread_id and thread_id[0] + ir_attachment = self.pool.get('ir.attachment') attachment_ids = [] for name, content in attachments: if isinstance(content, unicode): @@ -596,7 +597,7 @@ class mail_thread(osv.AbstractModel): 'res_model': context.get('thread_model') or self._name, 'res_id': thread_id, } - attachment_ids.append((0, 0, data_attach)) + attachment_ids.append(ir_attachment.create(cr, uid, data_attach, context=context)) values = kwargs values.update({