← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~therp-nl/ocb-server/7.0-lp1259165 into lp:ocb-server

 

Holger Brunn (Therp) has proposed merging lp:~therp-nl/ocb-server/7.0-lp1259165 into lp:ocb-server.

Requested reviews:
  OpenERP Community Backports Team (ocb)
Related bugs:
  Bug #1259165 in OpenERP Community Backports (Server): "ir.attachment doesn't return _auto_init's result"
  https://bugs.launchpad.net/ocb-server/+bug/1259165

For more details, see:
https://code.launchpad.net/~therp-nl/ocb-server/7.0-lp1259165/+merge/198262
-- 
https://code.launchpad.net/~therp-nl/ocb-server/7.0-lp1259165/+merge/198262
Your team OpenERP Community Backports Team is requested to review the proposed merge of lp:~therp-nl/ocb-server/7.0-lp1259165 into lp:ocb-server.
=== modified file 'openerp/addons/base/ir/ir_attachment.py'
--- openerp/addons/base/ir/ir_attachment.py	2013-12-06 17:36:02 +0000
+++ openerp/addons/base/ir/ir_attachment.py	2013-12-09 13:48:11 +0000
@@ -177,11 +177,12 @@
     }
 
     def _auto_init(self, cr, context=None):
-        super(ir_attachment, self)._auto_init(cr, context)
+        result = super(ir_attachment, self)._auto_init(cr, context)
         cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = %s', ('ir_attachment_res_idx',))
         if not cr.fetchone():
             cr.execute('CREATE INDEX ir_attachment_res_idx ON ir_attachment (res_model, res_id)')
             cr.commit()
+        return result
 
     def check(self, cr, uid, ids, mode, context=None, values=None):
         """Restricts the access to an ir.attachment, according to referred model


Follow ups