[FIX] mrp: missing context
context was not passed to move objects in action_cancel Closes #12598
This commit is contained in:
parent
1986980a51
commit
8914de8c53
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue