summaryrefslogtreecommitdiff
path: root/addons/crm/report
diff options
context:
space:
mode:
authorMathieu Duckerts-Antoine <dam@odoo.com>2019-08-04 20:53:34 +0000
committerMathieu Duckerts-Antoine <dam@odoo.com>2019-08-13 08:18:15 +0000
commit6d4ac56b0f6e25b46341dcb9ac3c08ae7b84c4f4 (patch)
tree57640bd3bf7d7271d176ff221c6e26871dc075bc /addons/crm/report
parentd561868bfa406b5ab22fd2719ec4426a773f4935 (diff)
[IMP] *: adapt xml files to new date filters functioning
A previous commit modifies the way in which date filters work in the Filters menu. In particular, the attribute default_period of filters with date attribute cannot take anymore values like 'this_week', 'last_7_days',... This commit modifies the xml acoordingly by replacing the attributes date and default_period by a suitable domain. Task ID: 2028787
Diffstat (limited to 'addons/crm/report')
-rw-r--r--addons/crm/report/crm_activity_report_views.xml4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/crm/report/crm_activity_report_views.xml b/addons/crm/report/crm_activity_report_views.xml
index ddd8b28f781..17266c870fa 100644
--- a/addons/crm/report/crm_activity_report_views.xml
+++ b/addons/crm/report/crm_activity_report_views.xml
@@ -54,7 +54,9 @@
<filter string="Won" name="won"
domain="[('stage_id.is_won', '=', True)]"/>
<separator/>
- <filter string="Completion Date" name="completion_date" date="date" default_period="last_365_days"/>
+ <filter string="Completed Last 365 Days" name="completion_date" domain="[
+ ('date', '>=', (datetime.datetime.combine(context_today() + relativedelta(days=-365), datetime.time(0,0,0)).to_utc()).strftime('%Y-%m-%d %H:%M:%S')),
+ ('date', '&lt;', (datetime.datetime.combine(context_today(), datetime.time(0,0,0)).to_utc()).strftime('%Y-%m-%d %H:%M:%S'))]"/>
<group expand="1" string="Group By">
<filter string="Subtype" name="group_by_subtype" context="{'group_by':'subtype_id'}"/>
<filter string="Activity Type" name="group_by_activity_type" context="{'group_by':'mail_activity_type_id'}"/>