Assign lots when lot qty - consumed qty > 0 in moves

This commit is contained in:
Raimon Esteve 2016-11-10 17:21:13 +01:00
parent e4b83ba6a8
commit a8e685444a

View file

@ -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(