[IMP] crm: add month filters for pipeline analysis
For pipeline analysis(crm.opportunity.report) add this month and last month filters in search view and set appropriate default filter on dashboard actions.
This commit is contained in:
committed by
Denis Vermylen (dve)
parent
0932a95115
commit
ec3372567e
@@ -109,6 +109,9 @@
|
||||
<field name="team_id" context="{'invisible_team': False}"/>
|
||||
<field name="user_id" string="Salesperson"/>
|
||||
<separator/>
|
||||
<filter string="This Month" name="this_month" domain="[('date_closed', '>=', context_today().strftime('%%Y-%%m-01'))]"/>
|
||||
<filter string="Last Month" name="last_month" domain="['&', ('date_closed', '>=', (context_today() - relativedelta(months=1)).strftime('%%Y-%%m-01')), ('date_closed', '<', context_today().strftime('%%Y-%%m-01'))]"/>
|
||||
<separator/>
|
||||
<filter string="Current" name="current" domain="[('active', '=', True)]"/>
|
||||
<filter string="Archived" name="archived" domain="[('active', '=', False)]"/>
|
||||
<group expand="0" string="Extended Filters">
|
||||
|
||||
@@ -116,7 +116,8 @@
|
||||
</a>
|
||||
</td>
|
||||
<td t-attf-class="#{values and values['won']['target'] and values['won']['this_month'] >= values['won']['target'] ? 'o_main' : 'o_secondary'}" title="To Opportunity Report">
|
||||
<a href="#" class="o_dashboard_action" name="crm.crm_opportunity_report_action_graph" data-context="{'search_default_won':'1'}">
|
||||
<a href="#" class="o_dashboard_action" name="crm.crm_opportunity_report_action_graph"
|
||||
data-context="{'search_default_won':'1', 'search_default_this_month': '1'}">
|
||||
<span class="o_highlight">
|
||||
<t t-if="!show_demo">
|
||||
<t t-esc="widget.render_monetary_field(values['won']['this_month'], values['currency_id'])"/>
|
||||
@@ -192,7 +193,8 @@
|
||||
</a>
|
||||
</td>
|
||||
<td class="o_secondary" title="To Opportunity Report">
|
||||
<a href="#" class="o_dashboard_action" name="crm.crm_opportunity_report_action_graph" data-context="{'search_default_won':'1'}">
|
||||
<a href="#" class="o_dashboard_action" name="crm.crm_opportunity_report_action_graph"
|
||||
data-context="{'search_default_won':'1', 'search_default_last_month':'1'}">
|
||||
<t t-esc="widget.render_monetary_field(values['won']['last_month'], values['currency_id'])"/>
|
||||
</a>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user