Do not use negative product id when there are none for quantities by warehouse
Otherwise this creates rows with negative id which are not valid for stored record. issue11289 review390181002 (grafted from d084cfdc49ff0ec37c3e99bc57e6d706586defb1) --HG-- branch : 6.0
This commit is contained in:
1 parent
fdf5cef66b
commit
cab8bf29a2
1 file changed
+2
-2
+2
-2
@@ -554,9 +554,9 @@ class ProductQuantitiesByWarehouse(ModelSQL, ModelView):
|
||||
product_column = Concat('product.template,', product.template)
|
||||
products = [('product.template', i) for i in product_template]
|
||||
else:
|
||||
product = context.get('product', -1)
|
||||
product = context.get('product')
|
||||
if product is None:
|
||||
product = -1
|
||||
product = []
|
||||
if isinstance(product, int):
|
||||
product = [product]
|
||||
product_clause = move.product.in_(product or [-1])
|
||||
|
||||
Reference in new issue
Block a user