Kirti Savalia(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-server/6.1-opw-576610-ksa into 
lp:openobject-server/6.1.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/6.1-opw-576610-ksa/+merge/114150

Hello,

Fixed the issue when attched the invoice at that time got the error bool object 
is unscriptable. 
-- 
https://code.launchpad.net/~openerp-dev/openobject-server/6.1-opw-576610-ksa/+merge/114150
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/6.1-opw-576610-ksa.
=== modified file 'openerp/addons/base/ir/ir_attachment.py'
--- openerp/addons/base/ir/ir_attachment.py	2012-03-09 10:04:29 +0000
+++ openerp/addons/base/ir/ir_attachment.py	2012-07-10 10:18:21 +0000
@@ -69,11 +69,12 @@
         # the linked document.
         targets = super(ir_attachment,self).read(cr, uid, ids, ['id', 'res_model', 'res_id'])
         model_attachments = {}
-        for target_dict in targets:
-            if not (target_dict['res_id'] and target_dict['res_model']):
-                continue
-            # model_attachments = { 'model': { 'res_id': [id1,id2] } }
-            model_attachments.setdefault(target_dict['res_model'],{}).setdefault(target_dict['res_id'],set()).add(target_dict['id'])
+        if targets:
+            for target_dict in targets:
+                if not (target_dict['res_id'] and target_dict['res_model']):
+                    continue
+                # model_attachments = { 'model': { 'res_id': [id1,id2] } }
+                model_attachments.setdefault(target_dict['res_model'],{}).setdefault(target_dict['res_id'],set()).add(target_dict['id'])
 
         # To avoid multiple queries for each attachment found, checks are
         # performed in batch as much as possible.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to