diff --git a/stock.py b/stock.py index 8936ecbedc..d1372e7e6d 100644 --- a/stock.py +++ b/stock.py @@ -146,10 +146,12 @@ class ShipmentOut: round=False) values = {} if quantity < out_quantity: - outgoing_moves.extend(Move.copy([out_move], default={ - 'quantity': out_move.uom.round( - out_quantity - quantity), - })) + with Transaction().set_context(_stock_move_split=True): + outgoing_moves.extend( + Move.copy([out_move], default={ + 'quantity': out_move.uom.round( + out_quantity - quantity), + })) values['quantity'] = out_move.uom.round(quantity) values['lot'] = move.lot.id to_write.extend(([out_move], values))