changeset d084cfdc49ff in modules/stock:default
details: https://hg.tryton.org/modules/stock?cmd=changeset&node=d084cfdc49ff
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
diffstat:
product.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (15 lines):
diff -r 14f43a99605e -r d084cfdc49ff product.py
--- a/product.py Mon Mar 07 00:52:58 2022 +0100
+++ b/product.py Sat Mar 19 15:02:35 2022 +0100
@@ -564,9 +564,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])