summaryrefslogtreecommitdiff
path: root/addons/im_livechat/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/im_livechat/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/im_livechat/report')
-rw-r--r--addons/im_livechat/report/im_livechat_report_channel_views.xml2
-rw-r--r--addons/im_livechat/report/im_livechat_report_operator_views.xml2
2 files changed, 2 insertions, 2 deletions
diff --git a/addons/im_livechat/report/im_livechat_report_channel_views.xml b/addons/im_livechat/report/im_livechat_report_channel_views.xml
index 71fccb7c7c9..efe0304bd46 100644
--- a/addons/im_livechat/report/im_livechat_report_channel_views.xml
+++ b/addons/im_livechat/report/im_livechat_report_channel_views.xml
@@ -33,7 +33,7 @@
<filter name="missed_session" string="Missed sessions" domain="[('nbr_speaker','&lt;=', 1)]"/>
<filter name="treated_session" string="Treated sessions" domain="[('nbr_speaker','&gt;', 1)]"/>
<filter name="last_24h" string="Last 24h" domain="[('start_date','&gt;', (context_today() - datetime.timedelta(days=1)).strftime('%%Y-%%m-%%d') )]"/>
- <filter name="last_week" string="Last Week" domain="[('start_date','&gt;', (context_today() - datetime.timedelta(weeks=1)).strftime('%%Y-%%m-%%d') )]"/>
+ <filter name="start_date_filter" string="Start Date" date="start_date" default_period="this_week"/>
<group expand="0" string="Group By...">
<filter name="group_by_session" string="Code" domain="[]" context="{'group_by':'technical_name'}"/>
<filter name="group_by_channel" string="Channel" domain="[]" context="{'group_by':'channel_id'}"/>
diff --git a/addons/im_livechat/report/im_livechat_report_operator_views.xml b/addons/im_livechat/report/im_livechat_report_operator_views.xml
index fd7a5c4b422..2aa147ca1b0 100644
--- a/addons/im_livechat/report/im_livechat_report_operator_views.xml
+++ b/addons/im_livechat/report/im_livechat_report_operator_views.xml
@@ -31,7 +31,7 @@
<field name="arch" type="xml">
<search string="Search report">
<filter name="last_24h" string="Last 24h" domain="[('start_date','&gt;', (context_today() - datetime.timedelta(days=1)).strftime('%%Y-%%m-%%d') )]"/>
- <filter name="last_week" string="Last Week" domain="[('start_date','&gt;', (context_today() - datetime.timedelta(weeks=1)).strftime('%%Y-%%m-%%d') )]"/>
+ <filter name="start_date_filter" string="Start Date" date="start_date" default_period="this_week"/>
<group expand="0" string="Group By...">
<filter name="group_by_channel" string="Channel" domain="[]" context="{'group_by':'channel_id'}"/>
<filter name="group_by_operator" string="Operator" domain="[('partner_id','!=', False)]" context="{'group_by':'partner_id'}"/>