Do not assign on pick and do not synchronize on pack

Assigning on pick prevents to edit the outgoing moves.
Synchronize on pack could undo user modification of outgoing moves.

issue9725
review304481002
This commit is contained in:
Maxime Richez
2020-10-21 23:48:57 +02:00
parent 0c896a46ab
commit da396b4223
-3
View File
@@ -1214,7 +1214,6 @@ class ShipmentOut(ShipmentAssignMixin, Workflow, ModelSQL, ModelView):
Move = pool.get('stock.move')
Move.do([m for s in shipments for m in s.inventory_moves])
cls._sync_inventory_to_outgoing(shipments, quantity=True)
Move.assign([m for s in shipments for m in s.outgoing_moves])
@classmethod
@ModelView.button
@@ -1223,8 +1222,6 @@ class ShipmentOut(ShipmentAssignMixin, Workflow, ModelSQL, ModelView):
def pack(cls, shipments):
pool = Pool()
Move = pool.get('stock.move')
Move.do([m for s in shipments for m in s.inventory_moves])
cls._sync_inventory_to_outgoing(shipments, quantity=True)
Move.assign([m for s in shipments for m in s.outgoing_moves])
def _sync_move_key(self, move):