[FIX] crm, sales_team: dashboard shortcuts
Partially an incorrect forward port of 27b6451. Moreover, the shortcuts
"exp. closing" and "overdue" use the action
`crm_lead_action_activities`, which filters by default
`activity_date_deadline != False`. This should be used as well when
counting.
opw-725666
This commit is contained in:
@@ -896,7 +896,7 @@ class Lead(models.Model):
|
||||
'nb_opportunities': 0,
|
||||
}
|
||||
|
||||
opportunities = self.search([('type', '=', 'opportunity'), ('user_id', '=', self._uid)])
|
||||
opportunities = self.search([('type', '=', 'opportunity'), ('user_id', '=', self._uid), ('activity_date_deadline', '!=', False)])
|
||||
|
||||
for opp in opportunities:
|
||||
# Expected closing
|
||||
|
||||
@@ -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-context="{'search_default_overdue_opp':'1'}">
|
||||
<a href="#" class="o_dashboard_action" name="crm.crm_lead_action_activities" data-context="{'search_default_overdue_opp':'1'}">
|
||||
<t t-if="!show_demo">
|
||||
<t t-esc="values['closing']['overdue']"/> exp. closing
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user