From 333ac27cd5c23e3e1a4f7d78828f28a2c844f8f4 Mon Sep 17 00:00:00 2001 From: Mathieu Duckerts-Antoine Date: Fri, 6 Jul 2018 17:08:52 +0200 Subject: [IMP] web: new TimeRangeMenu widget in search view This commit introduces a new widget 'TimeRangeMenu' used in the search view. It allows a user to easily: - search data with a given date or datetime field value in a specified period of time - compare the data of interest with data of the previous period or the previous year. The time range menu is available in the search view when one of the four following view types is instantiated: graph, pivot, cohort, or dashboard. Task Id: 1835644 --- addons/web/static/src/js/views/abstract_controller.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'addons/web/static/src/js/views/abstract_controller.js') diff --git a/addons/web/static/src/js/views/abstract_controller.js b/addons/web/static/src/js/views/abstract_controller.js index aed09c363cc..4bcb21f7a4d 100644 --- a/addons/web/static/src/js/views/abstract_controller.js +++ b/addons/web/static/src/js/views/abstract_controller.js @@ -67,6 +67,7 @@ var AbstractController = AbstractAction.extend(ControlPanelMixin, { this.searchView = params.searchView; this.searchViewHidden = params.searchViewHidden; this.groupable = params.groupable; + this.enableTimeRangeMenu = params.enableTimeRangeMenu; this.actionViews = params.actionViews; this.viewType = params.viewType; this.withControlPanel = params.withControlPanel !== false; @@ -428,6 +429,7 @@ var AbstractController = AbstractAction.extend(ControlPanelMixin, { searchview: this.searchView, search_view_hidden: !this.searchable || this.searchviewHidden, groupable: this.groupable, + enableTimeRangeMenu: this.enableTimeRangeMenu, }); this._pushState(); -- cgit v1.2.3