summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/chrome
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2017-09-30 13:47:02 +0200
committerAaron Bohy <aab@odoo.com>2017-09-30 15:59:24 +0200
commitb53af081cb6fc0bb3a6a7bb308c1764f9dc7528d (patch)
tree944ab50ff4d6ca64e2680b439c1052a3332ebafc /addons/web/static/src/js/chrome
parent776bac6a069fc1ef2d6bea0e85a0737e3cefecef (diff)
Revert "[IMP] web: filter when clicking on tags in Kanban"
This reverts commit b6ef149b as it seems that we don't want this feature ultimately (was confusing for users trying to open the record, but it filtered instead). Note that opening the record by clicking on a tag still doesn't work, but this is fixed by the next commit.
Diffstat (limited to 'addons/web/static/src/js/chrome')
-rw-r--r--addons/web/static/src/js/chrome/search_view.js28
-rw-r--r--addons/web/static/src/js/chrome/view_manager.js9
2 files changed, 0 insertions, 37 deletions
diff --git a/addons/web/static/src/js/chrome/search_view.js b/addons/web/static/src/js/chrome/search_view.js
index d8d02ac9a41..ecd7db41a7d 100644
--- a/addons/web/static/src/js/chrome/search_view.js
+++ b/addons/web/static/src/js/chrome/search_view.js
@@ -603,34 +603,6 @@ var SearchView = Widget.extend({
current_category = filter.category;
});
},
-
- //--------------------------------------------------------------------------
- // Public
- //--------------------------------------------------------------------------
-
- /**
- * Activates a filter for a given domain.
- * FIXME: the way it is done could be improved, but the actual state of the
- * searchview doesn't allow to do much better. For instance, if the same
- * filter is added twice, it appears twice in the facets. This should be
- * improved when the searchview will be rewrote.
-
- * @param {string} domain the domain to filter on
- * @param {string} help the text to display in the facet
- */
- addFilter: function (domain, help) {
- var filter = {
- attrs: {
- domain: domain,
- help: help,
- },
- };
- var filterWidget = new search_inputs.Filter(filter);
- var filterGroup = new search_inputs.FilterGroup([filterWidget], this);
- var facet = filterGroup.make_facet([filterGroup.make_value(filter)]);
- this.query.add([facet], {silent: true});
- this.query.trigger('reset');
- },
});
_.extend(SearchView, {
diff --git a/addons/web/static/src/js/chrome/view_manager.js b/addons/web/static/src/js/chrome/view_manager.js
index fe44cc503dd..5c32715a98f 100644
--- a/addons/web/static/src/js/chrome/view_manager.js
+++ b/addons/web/static/src/js/chrome/view_manager.js
@@ -28,7 +28,6 @@ var ViewManager = Widget.extend(ControlPanelMixin, {
_.extend(this.env, this._process_search_data(d.domains, d.contexts, d.groupbys));
this.active_view.controller.reload(_.extend({offset: 0}, this.env));
},
- add_filter: '_onAddFilter',
switch_view: function(event) {
if ('res_id' in event.data) {
this.env.currentId = event.data.res_id;
@@ -653,14 +652,6 @@ var ViewManager = Widget.extend(ControlPanelMixin, {
//--------------------------------------------------------------------------
/**
- * @private
- */
- _onAddFilter: function (event) {
- if (this.searchview) {
- this.searchview.addFilter(event.data.domain, event.data.help);
- }
- },
- /**
* This handler is probably called by a sub form view when the user discards
* its value. The usual result of this is that we switch back to the
* previous view (the first in our action stack). We do this in a really