[FIX] mail_gateway: Fixed unique file name error while sending mail.
lp bug: https://launchpad.net/bugs/730632 fixed bzr revid: uco@tinyerp.com-20110309123033-lwpzrncs7qge8jag
This commit is contained in:
@@ -128,6 +128,10 @@ class mailgate_thread(osv.osv):
|
||||
for case in cases:
|
||||
attachments = []
|
||||
for att in attach:
|
||||
att_ids = att_obj.search(cr, uid, [('name','=',att[0])])
|
||||
if att_ids:
|
||||
attachments.append(att_ids[0])
|
||||
else:
|
||||
attachments.append(att_obj.create(cr, uid, {'res_model':case._name,'res_id':case.id, 'name': att[0], 'datas': base64.encodestring(att[1])}))
|
||||
|
||||
partner_id = hasattr(case, 'partner_id') and (case.partner_id and case.partner_id.id or False) or False
|
||||
|
||||
Reference in New Issue
Block a user