mirror of
https://github.com/NaN-tic/trytond-stock_lot_fifo.git
synced 2023-12-14 06:02:54 +01:00
Assign lots when lot qty - consumed qty > 0 in moves
This commit is contained in:
parent
e4b83ba6a8
commit
a8e685444a
1 changed files with 2 additions and 2 deletions
4
stock.py
4
stock.py
|
@ -60,10 +60,10 @@ class Move:
|
|||
remainder = move.internal_quantity
|
||||
while lots and remainder > 0.0:
|
||||
lot = lots.pop(0)
|
||||
if not lot.quantity > 0.0:
|
||||
continue
|
||||
consumed_quantities.setdefault(lot.id, 0.0)
|
||||
lot_quantity = lot.quantity - consumed_quantities[lot.id]
|
||||
if not lot_quantity > 0.0:
|
||||
continue
|
||||
assigned_quantity = min(lot_quantity, remainder)
|
||||
if assigned_quantity == remainder:
|
||||
move.quantity = Uom.compute_qty(
|
||||
|
|
Loading…
Reference in a new issue