Skip to content
Permalink
Browse files

[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
  • Loading branch information...
gla-odoo committed Apr 15, 2019
1 parent b90ea31 commit 622e5eb20a44cc6d90be9f584b6ca46e7fa71f2b
@@ -35,6 +35,7 @@ def _plan_prepare_values(self):
'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(),
}

@@ -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}'/>

0 comments on commit 622e5eb

Please sign in to comment.
You can’t perform that action at this time.