diff --git a/addons/sale_timesheet/models/account.py b/addons/sale_timesheet/models/account.py index d1181785557..8a5fbdcaad4 100644 --- a/addons/sale_timesheet/models/account.py +++ b/addons/sale_timesheet/models/account.py @@ -134,7 +134,7 @@ class AccountAnalyticLine(models.Model): total_revenue_invoiced = sum(analytic_lines.mapped('timesheet_revenue')) # compute (new) revenue of current timesheet line values['timesheet_revenue'] = min( - analytic_account.currency_id.round(unit_amount * so_line.currency_id.compute(so_line.price_unit, analytic_account.currency_id) * (1-so_line.discount)), + analytic_account.currency_id.round(unit_amount * sale_price * (1-so_line.discount/100)), total_revenue_so - total_revenue_invoiced ) values['timesheet_invoice_type'] = 'billable_fixed'