summaryrefslogtreecommitdiff
path: root/addons/crm/report
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2018-06-15 10:36:31 +0200
committerAdrien Dieudonne <adr@odoo.com>2018-07-06 14:09:09 +0200
commitf9874b2b047332bba5a032a506f63e8d453794bd (patch)
treed8a2733fb435a7e5e1086d9b78b80e4cf24e3945 /addons/crm/report
parent097464de6f85020ad1e56bbc253837a7d60e47e4 (diff)
[IMP] *: adaptation of search views
It is now possible to easily filter data using periods of time (e.g. Creation Date: This Week). This adds greater flexibility to the search view and has made some old filters become useless. In this commit, we alter the search views in order to profit of the new framework possibilities.
Diffstat (limited to 'addons/crm/report')
-rw-r--r--addons/crm/report/crm_activity_report_views.xml3
-rw-r--r--addons/crm/report/crm_opportunity_report_views.xml8
2 files changed, 6 insertions, 5 deletions
diff --git a/addons/crm/report/crm_activity_report_views.xml b/addons/crm/report/crm_activity_report_views.xml
index 8ddf6fcc63a..2e5c6642159 100644
--- a/addons/crm/report/crm_activity_report_views.xml
+++ b/addons/crm/report/crm_activity_report_views.xml
@@ -36,8 +36,7 @@
<filter string="Won" name="won"
domain="['&amp;', ('stage_id.probability', '=', 100), ('stage_id.on_change', '=', 1)]"/>
<separator/>
- <filter string="This Month" name="this_month" domain="[('date', '&gt;=', context_today().strftime('%%Y-%%m-01'))]"/>
- <filter string="Last Month" name="last_month" domain="['&amp;', ('date', '&gt;=', (context_today() - relativedelta(months=1)).strftime('%%Y-%%m-01')), ('date', '&lt;', context_today().strftime('%%Y-%%m-01'))]"/>
+ <filter string="Date" name="filter_date" date="date"/>
<field name="team_id" context="{'invisible_team': False}"/>
<field name="author_id" string="Created By"/>
<group expand="1" string="Group By">
diff --git a/addons/crm/report/crm_opportunity_report_views.xml b/addons/crm/report/crm_opportunity_report_views.xml
index 8ae35895a38..86058e9c5d5 100644
--- a/addons/crm/report/crm_opportunity_report_views.xml
+++ b/addons/crm/report/crm_opportunity_report_views.xml
@@ -101,8 +101,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', '&gt;=', context_today().strftime('%%Y-%%m-01'))]"/>
- <filter string="Last Month" name="last_month" domain="['&amp;', ('date_closed', '&gt;=', (context_today() - relativedelta(months=1)).strftime('%%Y-%%m-01')), ('date_closed', '&lt;', context_today().strftime('%%Y-%%m-01'))]"/>
+ <filter string="Creation Date" name="filter_create_date" date="create_date"/>
+ <filter string="Expected Closing" name="filter_date_deadline" date="date_deadline"/>
+ <filter string="Date Closed" name="date_closed_filter" date="date_closed"/>
<separator/>
<filter string="Current" name="current" domain="[('active', '=', True)]"/>
<filter string="Archived" name="archived" domain="[('active', '=', False)]"/>
@@ -127,8 +128,9 @@
<filter string="Stage" name="stage" context="{'group_by':'stage_id'}"/>
<separator orientation="vertical" />
<filter string="Creation Date" context="{'group_by':'create_date:month'}" name="month"/>
- <filter string="Expected Closing" context="{'group_by':'date_deadline:month'}" name="date_deadline"/>
<filter string="Conversion Date" context="{'group_by':'date_conversion:month'}" name="conversion_date" help="Conversion Date from Lead to Opportunity"/>
+ <filter string="Expected Closing" context="{'group_by':'date_deadline:month'}" name="date_deadline"/>
+ <filter string="Closed Date" context="{'group_by':'date_closed'}" name="date_closed_groupby"/>
<filter string="Lost Reason" name="lostreason" context="{'group_by':'lost_reason'}"/>
</group>
</search>