[FIX] sales_team, crm: expected closing
On the CRM dashboard, the shortcut 'exp. closing' is the same than the
'overdue' shortcut. However, the number of opportunities in these
categories is computed differently (see method
`retrieve_sales_dashboard`).
We introduce a new filter "Overdue Opportunities" which reflects this
difference.
Backport of 9d2f48dc7f
opw-704173
opw-751165
This commit is contained in:
@@ -633,6 +633,9 @@
|
||||
]"/>
|
||||
<filter string="Overdue Activities" name="overdue"
|
||||
domain="[('date_action', '<', context_today().strftime('%Y-%m-%d'))]"/>
|
||||
<filter string="Overdue Opportunities" name="overdue_opp"
|
||||
domain="[('date_deadline', '<', context_today().strftime('%Y-%m-%d'))]"
|
||||
help="Show all opportunities with a deadline for which the next action date is before today"/>
|
||||
<separator/>
|
||||
<filter string="Follow-up" name="follow_up"
|
||||
domain="[('date_action', '<=', context_today().strftime('%Y-%m-%d') )]"
|
||||
|
||||
@@ -67,6 +67,8 @@ var SalesTeamDashboardView = KanbanView.extend({
|
||||
} else if (action_name === 'crm.action_your_pipeline') {
|
||||
if (action_extra === 'overdue') {
|
||||
additional_context['search_default_overdue'] = 1;
|
||||
} else if (action_extra === 'overdue_opp') {
|
||||
additional_context['search_default_overdue_opp'] = 1;
|
||||
}
|
||||
} else if (action_name === 'crm.crm_opportunity_report_action_graph') {
|
||||
additional_context['search_default_won'] = 1;
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
</a>
|
||||
</td>
|
||||
<td t-if="show_demo or (values and values['closing']['overdue'] != 0)" class="o_warning" title="To Opportunities">
|
||||
<a href="#" class="o_dashboard_action" name="crm.action_your_pipeline" data-extra="overdue">
|
||||
<a href="#" class="o_dashboard_action" name="crm.action_your_pipeline" data-extra="overdue_opp">
|
||||
<t t-if="!show_demo">
|
||||
<t t-esc="values['closing']['overdue']"/> exp. closing
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user