Do not delete inventory line of inactive product
On the first run, inactive products with stock quantity are created, so we must not delete them on the second call. issue6931 review38931002
This commit is contained in:
1 parent
55082d76a6
commit
a0b8974ea4
1 file changed
+1
-2
+1
-2
@@ -231,8 +231,7 @@ class Inventory(Workflow, ModelSQL, ModelView):
|
||||
|
||||
# Update existing lines
|
||||
for line in inventory.lines:
|
||||
if not (line.product.active and
|
||||
line.product.type == 'goods'
|
||||
if not (line.product.type == 'goods'
|
||||
and not line.product.consumable):
|
||||
Line.delete([line])
|
||||
continue
|
||||
|
||||
Reference in new issue
Block a user