summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjem-odoo <jem@openerp.com>2018-10-08 09:55:45 +0000
committerjem-odoo <jem@openerp.com>2018-10-08 12:58:16 +0000
commit026064c3c9be12adf181a101d7619595e070251b (patch)
tree94ed218d5b28dbd773c3cbfb31cbc4aa60ceea23
parentdddd4072de1639f71564bbf30baa671cb7e995e4 (diff)
[FIX] sale_timesheet: include milestone in profitability report
The project overview is based on the profitability report to get the amount invoiced and to invoice for service sold on a sale order linked to a project. This request is wrong as it does not take the milestone sale line into account. This commit fixes it. opw-1890106 closes odoo/odoo#27538
-rw-r--r--addons/sale_timesheet/report/project_profitability_report_analysis.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/sale_timesheet/report/project_profitability_report_analysis.py b/addons/sale_timesheet/report/project_profitability_report_analysis.py
index 366df3cc970..2ec12acea09 100644
--- a/addons/sale_timesheet/report/project_profitability_report_analysis.py
+++ b/addons/sale_timesheet/report/project_profitability_report_analysis.py
@@ -64,11 +64,11 @@ class ProfitabilityAnalysis(models.Model):
ELSE 0.0
END AS expense_amount_untaxed_invoiced,
CASE
- WHEN SOL.qty_delivered_method = 'timesheet' THEN (SOL.untaxed_amount_to_invoice / CASE COALESCE(S.currency_rate, 0) WHEN 0 THEN 1.0 ELSE S.currency_rate END)
+ WHEN SOL.qty_delivered_method IN ('timesheet', 'manual') THEN (SOL.untaxed_amount_to_invoice / CASE COALESCE(S.currency_rate, 0) WHEN 0 THEN 1.0 ELSE S.currency_rate END)
ELSE 0.0
END AS amount_untaxed_to_invoice,
CASE
- WHEN SOL.qty_delivered_method = 'timesheet' THEN (SOL.untaxed_amount_invoiced / CASE COALESCE(S.currency_rate, 0) WHEN 0 THEN 1.0 ELSE S.currency_rate END)
+ WHEN SOL.qty_delivered_method IN ('timesheet', 'manual') THEN (SOL.untaxed_amount_invoiced / CASE COALESCE(S.currency_rate, 0) WHEN 0 THEN 1.0 ELSE S.currency_rate END)
ELSE 0.0
END AS amount_untaxed_invoiced,
COST_SUMMARY.timesheet_unit_amount AS timesheet_unit_amount,