Merge PR #89 into 12.0

Signed-off-by dreispt
This commit is contained in:
OCA-git-bot
2020-04-09 20:35:58 +00:00

View File

@@ -55,6 +55,11 @@ class StockInventoryValuationReport(models.TransientModel):
create=False, edit=False))
ReportLine = self.env['stock.inventory.valuation.view']
for product in products:
standard_price = product.standard_price
if self.date:
standard_price = product.get_history_price(
self.env.user.company_id.id,
date=self.date)
line = {
'name': product.name,
'reference': product.default_code,
@@ -63,8 +68,8 @@ class StockInventoryValuationReport(models.TransientModel):
'uom_id': product.uom_id,
'currency_id': product.currency_id,
'cost_currency_id': product.cost_currency_id,
'standard_price': product.standard_price,
'stock_value': product.stock_value,
'standard_price': standard_price,
'stock_value': product.qty_at_date * standard_price,
'cost_method': product.cost_method,
}
if product.qty_at_date != 0: