[FIX] stock: Not possible to cancel a pick
- Set the Outgoing shipping of your warehouse to pick + pack + ship - Create a SO with a stockable product and validate it - Set the qty done to 1 in the ship and validate it - Cancel the pack Bug: It was impossible to cancel the pick. opw:1887098 closes odoo/odoo#27193
This commit is contained in:
@@ -1021,7 +1021,7 @@ class StockMove(models.Model):
|
||||
if move.propagate:
|
||||
# only cancel the next move if all my siblings are also cancelled
|
||||
if all(state == 'cancel' for state in siblings_states):
|
||||
move.move_dest_ids._action_cancel()
|
||||
move.move_dest_ids.filtered(lambda m: m.state != 'done')._action_cancel()
|
||||
else:
|
||||
if all(state in ('done', 'cancel') for state in siblings_states):
|
||||
move.move_dest_ids.write({'procure_method': 'make_to_stock'})
|
||||
|
||||
Reference in New Issue
Block a user