Add _stock_move_split in context to copy move for split
issue7152 review36121003
This commit is contained in:
1 parent
563c43ef84
commit
05f8982a34
1 file changed
+6
-4
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user