From 7f0d904d3ab4faf0ea55ab7de0d2e98dc3d764f9 Mon Sep 17 00:00:00 2001 From: Geoffroy Larue Date: Mon, 15 Apr 2019 09:03:49 +0000 Subject: [PATCH] [IMP] sale_timesheet: profitability report MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the Project Overview, the Profitability report takes into account Timesheet costs, but doesn't include information on Revenue. Because of that, the user is missing crucial information to determine the profitability of a given project. This commit aims at fixing this issue by sending the user to the 'Project Costs and Revenues' report of the concerned project when clicking the 'Profitability' button within the Project Overview page. Task-1963932 closes odoo/odoo#32554 Signed-off-by: Jérome Maes (jem) --- addons/sale_timesheet/models/project_overview.py | 1 + addons/sale_timesheet/views/hr_timesheet_templates.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/sale_timesheet/models/project_overview.py b/addons/sale_timesheet/models/project_overview.py index af275ba9a3b..640288ddba1 100644 --- a/addons/sale_timesheet/models/project_overview.py +++ b/addons/sale_timesheet/models/project_overview.py @@ -35,6 +35,7 @@ class Project(models.Model): 'projects': self, 'currency': currency, 'timesheet_domain': [('project_id', 'in', self.ids)], + 'profitability_domain': [('project_id', 'in', self.ids)], 'stat_buttons': self._plan_get_stat_button(), } diff --git a/addons/sale_timesheet/views/hr_timesheet_templates.xml b/addons/sale_timesheet/views/hr_timesheet_templates.xml index 0ba420957db..7f999d9e27c 100644 --- a/addons/sale_timesheet/views/hr_timesheet_templates.xml +++ b/addons/sale_timesheet/views/hr_timesheet_templates.xml @@ -66,7 +66,7 @@ Timesheets - Profitability + Profitability