diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 563e3a8d1c3..5d2f6c36a98 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -774,11 +774,11 @@ class mrp_production(osv.osv): proc_obj = self.pool.get('procurement.order') for production in self.browse(cr, uid, ids, context=context): if production.move_created_ids: - move_obj.action_cancel(cr, uid, [x.id for x in production.move_created_ids]) + move_obj.action_cancel(cr, uid, [x.id for x in production.move_created_ids], context=context) procs = proc_obj.search(cr, uid, [('move_dest_id', 'in', [x.id for x in production.move_lines])], context=context) if procs: proc_obj.cancel(cr, uid, procs, context=context) - move_obj.action_cancel(cr, uid, [x.id for x in production.move_lines]) + move_obj.action_cancel(cr, uid, [x.id for x in production.move_lines], context=context) self.write(cr, uid, ids, {'state': 'cancel'}) # Put related procurements in exception proc_obj = self.pool.get("procurement.order")