Ensure customer moves are added in draft state

We can not rely on the asynchronous sale processing to set to draft the
customer moves because it can happen after the drop shipment is done.

issue11121
review376431002
This commit is contained in:
Cédric Krier
2022-01-20 18:57:31 +01:00
parent e0c5313f55
commit e4a87f78fd
+1
View File
@@ -567,6 +567,7 @@ class ShipmentDrop(Workflow, ModelSQL, ModelView):
move.shipment = shipment
to_save.append(move)
Move.save(to_save)
Move.draft(to_save)
cls._synchronize_moves(shipments)
@classmethod