[FIX] stock: fix unreserve
In the original commit 19116cc878, `action_assign` was called
on all `move_ids`. However, after API conversion, moves are filtered.
Closes #25886
opw-1868834
This commit is contained in:
committed by
Nicolas Martinelli
parent
fac1d2dd2a
commit
4f4fdb2f35
@@ -784,8 +784,9 @@ class Picking(models.Model):
|
||||
else:
|
||||
moves = self.env['stock.move'].browse(move_ids)
|
||||
if self.env.context.get('no_state_change'):
|
||||
moves = moves.filtered(lambda m: m.reserved_quant_ids)
|
||||
moves.do_unreserve()
|
||||
moves.filtered(lambda m: m.reserved_quant_ids).do_unreserve()
|
||||
else:
|
||||
moves.do_unreserve()
|
||||
moves.action_assign(no_prepare=True)
|
||||
|
||||
@api.multi
|
||||
|
||||
Reference in New Issue
Block a user