From b7e3221dc5fdbfc9580f37faf74eddcb6a72a12e Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Mon, 22 Aug 2022 14:11:11 +0200 Subject: [PATCH] Pass a tuple of lists into product by locations issue11595 review445141003 --- product.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/product.py b/product.py index 87a8030e9f..7b38d5e2a9 100644 --- a/product.py +++ b/product.py @@ -87,11 +87,11 @@ def check_no_stock_if_inactive(func): Product = pool.get('product.product') product2locations = defaultdict(list) - product_ids = [(p.id,) for p in sub_products] + product_ids = list(map(int, sub_products)) with Transaction().set_context(company=company.id): quantities = Product.products_by_location( location_ids, with_childs=True, - grouping=('product',), grouping_filter=product_ids) + grouping=('product',), grouping_filter=(product_ids,)) for key, quantity in quantities.items(): location_id, product_id, = key if quantity: