[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. opw-704173
This commit is contained in:
@@ -588,6 +588,9 @@
|
||||
<filter string="Overdue Activities" name="overdue"
|
||||
domain="[('date_action', '<', context_today().strftime('%Y-%m-%d'))]"
|
||||
help="Show all opportunities for which the next action date is before today"/>
|
||||
<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="Unread Messages" name="message_needaction" domain="[('message_needaction','=',True)]"/>
|
||||
<filter string="Lost" domain="[('active', '=', False)]"/>
|
||||
|
||||
@@ -65,6 +65,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