[FIX] Propagate of propagate_from on quants should be done with superuser (courtesy of Jos De Graeve)

This commit is contained in:
Josse Colpaert 2015-01-26 10:12:21 +01:00
parent 25b1df2eb3
commit 9b749d4d79
1 changed files with 1 additions and 1 deletions

View File

@ -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: