[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:
Goffin Simon
2018-09-24 12:50:59 +00:00
parent 62770ae9b8
commit c72352d667
+1 -1
View File
@@ -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'})