diff options
| author | Geoffroy Larue <gla@odoo.com> | 2019-04-15 09:03:49 +0000 |
|---|---|---|
| committer | Geoffroy Larue <gla@odoo.com> | 2019-04-15 09:32:11 +0000 |
| commit | 7f0d904d3ab4faf0ea55ab7de0d2e98dc3d764f9 (patch) | |
| tree | 23d3bbf8abbc4c37e28dee021a5d0a5e95414242 | |
| parent | 637f19e62109efecb0febca271b6db18537706fe (diff) | |
[IMP] sale_timesheet: profitability report
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) <jem@openerp.com>
| -rw-r--r-- | addons/sale_timesheet/models/project_overview.py | 1 | ||||
| -rw-r--r-- | addons/sale_timesheet/views/hr_timesheet_templates.xml | 2 |
2 files changed, 2 insertions, 1 deletions
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 @@ </td> <td>Timesheets</td> <th rowspan="6"> - <a type="action" data-model="account.analytic.line" t-att-data-domain="json.dumps(timesheet_domain)" data-context='{"pivot_row_groupby": ["timesheet_invoice_id"], "pivot_column_groupby": ["date:month"],"pivot_measures": ["amount"]}' data-views='[[0, "pivot"], [0, "list"]]' tabindex="-1">Profitability</a> + <a type="action" data-model="project.profitability.report" t-att-data-domain="json.dumps(profitability_domain)" data-context="{'group_by_no_leaf':1, 'group_by':[], 'sale_show_order_product_name': 1}" data-views='[[0, "pivot"], [0, "graph"]]' tabindex="-1">Profitability</a> </th> <td class="o_timesheet_plan_dashboard_cell"> <t t-esc="dashboard['profit']['invoiced']" t-options='{"widget": "monetary", "display_currency": currency}'/> |
