changeset 1d2d493a0e02 in modules/stock:6.2
details: https://hg.tryton.org/modules/stock?cmd=changeset&node=1d2d493a0e02
description:
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)
diffstat:
product.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (15 lines):
diff -r bff64518396d -r 1d2d493a0e02 product.py
--- a/product.py Tue Mar 01 19:27:36 2022 +0100
+++ b/product.py Sat Mar 19 15:02:35 2022 +0100
@@ -554,9 +554,9 @@
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])