From 9b749d4d795200ee6d21da965b45617f7f0daa7c Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Mon, 26 Jan 2015 10:12:21 +0100 Subject: [PATCH] [FIX] Propagate of propagate_from on quants should be done with superuser (courtesy of Jos De Graeve) --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index a9a56e7b4b2..695d76e6df4 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -578,7 +578,7 @@ class stock_quant(osv.osv): if remaining_to_solve_quant_ids: self.write(cr, SUPERUSER_ID, remaining_to_solve_quant_ids, {'propagated_from_id': remaining_neg_quant.id}, context=context) if solving_quant.propagated_from_id and solved_quant_ids: - self.write(cr, uid, solved_quant_ids, {'propagated_from_id': solving_quant.propagated_from_id.id}, context=context) + self.write(cr, SUPERUSER_ID, solved_quant_ids, {'propagated_from_id': solving_quant.propagated_from_id.id}, context=context) #delete the reconciled quants, as it is replaced by the solved quants self.unlink(cr, SUPERUSER_ID, [quant_neg.id], context=context) if solved_quant_ids: