stock_valuation_xlsx: fix crash when start valuation = current for variation wizard

This commit is contained in:
Alexis de Lattre
2021-02-26 10:57:23 +01:00
parent ec7601c59d
commit 4f4d3323d4

View File

@@ -124,7 +124,7 @@ class StockVariationXlsx(models.TransientModel):
ppo = self.env['product.product']
ppho = self.env['product.price.history']
fields_list = self._prepare_product_fields()
if not standard_price_end_date:
if not standard_price_start_date or not standard_price_end_date:
fields_list.append('standard_price')
products = ppo.search_read([('id', 'in', filter_product_ids)], fields_list)
product_id2data = {}