From d63c4b2433211f6b4236f8f9d59c3cbce15ad13d Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 3 Nov 2020 17:24:36 +0100 Subject: [PATCH] [FIX] stock_valuation_xlsx: bad context key for past stock level --- stock_valuation_xlsx/wizard/stock_valuation_xlsx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock_valuation_xlsx/wizard/stock_valuation_xlsx.py b/stock_valuation_xlsx/wizard/stock_valuation_xlsx.py index 6bb9b52..99c933b 100644 --- a/stock_valuation_xlsx/wizard/stock_valuation_xlsx.py +++ b/stock_valuation_xlsx/wizard/stock_valuation_xlsx.py @@ -239,7 +239,7 @@ class StockValuationXlsx(models.TransientModel): self.ensure_one() logger.debug('Start compute_data_from_past_stock past_date=%s', past_date) ppo = self.env['product.product'] - products = ppo.with_context(to_date=past_date, location_id=self.location_id.id).browse(product_ids) + products = ppo.with_context(to_date=past_date, location=self.location_id.id).browse(product_ids) res = [] in_stock_products = {} for product in products: