changeset 0bb0fb93531e in modules/stock:6.0
details: https://hg.tryton.org/modules/stock?cmd=changeset&node=0bb0fb93531e
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 8e79d6e6886f -r 0bb0fb93531e product.py
--- a/product.py Tue Mar 01 19:27:57 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])