From d0735fc55713117e8470c1036a9fe9dd947ea8be Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 19 May 2015 22:16:01 +0200 Subject: [PATCH] [FIX] procurement_jit_stock: don't lose autocommit parameter run method in procurement as the positional parameter autocommit that was not kept in procurement_jit_stock which may introduce issues in override --- addons/procurement_jit_stock/procurement_jit_stock.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/procurement_jit_stock/procurement_jit_stock.py b/addons/procurement_jit_stock/procurement_jit_stock.py index 2f4de3e5754..5353b3edc0d 100644 --- a/addons/procurement_jit_stock/procurement_jit_stock.py +++ b/addons/procurement_jit_stock/procurement_jit_stock.py @@ -25,14 +25,14 @@ from openerp.osv import osv class procurement_order(osv.osv): _inherit = "procurement.order" - def run(self, cr, uid, ids, context=None): + def run(self, cr, uid, ids, autocommit=False, context=None): context = dict(context or {}, procurement_autorun_defer=True) - res = super(procurement_order, self).run(cr, uid, ids, context=context) + res = super(procurement_order, self).run(cr, uid, ids, autocommit=autocommit, context=context) procurement_ids = self.search(cr, uid, [('move_dest_id.procurement_id', 'in', ids)], order='id', context=context) if procurement_ids: - return self.run(cr, uid, procurement_ids, context=context) + return self.run(cr, uid, procurement_ids, autocommit=autocommit, context=context) return res class stock_move(osv.osv):