openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #03911
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-730632-uco into lp:openobject-addons
Ujjvala Collins (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-730632-uco into lp:openobject-addons.
Requested reviews:
Bhumika (OpenERP) (sbh-openerp)
Related bugs:
#730632 [6.0] CRM - Cannot send multiple times the same attachment through email
https://bugs.launchpad.net/bugs/730632
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-730632-uco/+merge/52671
[FIX] mail_gateway: Fixed file name error while sending mail from crm.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-730632-uco/+merge/52671
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-730632-uco.
=== modified file 'mail_gateway/mail_gateway.py'
--- mail_gateway/mail_gateway.py 2011-02-24 15:03:09 +0000
+++ mail_gateway/mail_gateway.py 2011-03-09 12:34:20 +0000
@@ -128,6 +128,10 @@
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
Follow ups