Fix: avoid to create inventory lines with negatove quantity
This commit is contained in:
1 parent
693422a1ac
commit
efe20e105c
1 file changed
+4
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user