[FIX] stock_valuation_xlsx: bad context key for past stock level

This commit is contained in:
Alexis de Lattre
2020-11-03 17:24:36 +01:00
parent 4dadc8047e
commit d63c4b2433

View File

@@ -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: