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

This commit is contained in:
Alexis de Lattre
2020-11-03 17:18:26 +01:00
parent 11882c712c
commit efed3e3880

View File

@@ -235,7 +235,7 @@ class StockValuationXlsx(models.TransientModel):
self.ensure_one() self.ensure_one()
logger.debug('Start compute_data_from_past_stock past_date=%s', past_date) logger.debug('Start compute_data_from_past_stock past_date=%s', past_date)
ppo = self.env['product.product'] 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 = [] res = []
in_stock_products = {} in_stock_products = {}
for product in products: for product in products: