From efed3e388016659d5ca8dcbb34ea0d4c376753d8 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 3 Nov 2020 17:18:26 +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 efc8ab2..0a1eb76 100644 --- a/stock_valuation_xlsx/wizard/stock_valuation_xlsx.py +++ b/stock_valuation_xlsx/wizard/stock_valuation_xlsx.py @@ -235,7 +235,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: