[FIX] don't browse all ids as we refresh every iteration in the worst
authorHolger Brunn <hbrunn@therp.nl>
Wed, 26 Mar 2014 14:29:23 +0000 (15:29 +0100)
committerHolger Brunn <hbrunn@therp.nl>
Wed, 26 Mar 2014 14:29:23 +0000 (15:29 +0100)
case

lp bug: https://launchpad.net/bugs/1297887 fixed

bzr revid: hbrunn@therp.nl-20140326142923-hvt7t2i8s9mnalki

addons/procurement/procurement.py

index b35a775..dfaf289 100644 (file)
@@ -195,7 +195,8 @@ class procurement_order(osv.osv):
         return self.write(cr, uid, ids, {'state': 'confirmed'}, context=context)
 
     def run(self, cr, uid, ids, context=None):
-        for procurement in self.browse(cr, uid, ids, context=context):
+        for procurement_id in ids:
+            procurement = self.browse(cr, uid, procurement_id, context=context)
             if procurement.state not in ("running", "done"):
                 if self._assign(cr, uid, procurement, context=context):
                     procurement.refresh()