Fix: avoid to create inventory lines with negatove quantity

This commit is contained in:
Bertrand Chenal committed 2008-05-20 19:15:50 +02:00
1 parent 693422a1ac
commit efe20e105c
1 file changed
+4
+4
View File
@@ -216,8 +216,12 @@ class CompleteInventory(Wizard):
for inventory in inventories:
products = [line.product.id for line in inventory.lines]
for (product, uom, qty) in indexed_data[inventory.location.id]:
# Skip products already in the inventory:
if product in products:
continue
if qty <= 0.0:
qty = 0
if product in products: continue
line_obj.create(
cursor, user,
{'product': product,