summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2018-12-11 13:51:04 +0000
committerGéry Debongnie <ged@odoo.com>2018-12-11 13:54:26 +0000
commit13aae100e2bc0589e2313fd4105b39c0eeea4db0 (patch)
tree4d4ee78b5aebdf2ef4793d9694d56f8b16bd3619 /addons/web/static/src/js
parent6c1445b24e87a0791ff5c838c480cec17b6b2880 (diff)
[FIX] web: do not render invisible filters in search view
In some cases, the web client may receive a search view with invisible filters. This is due to the way field_view_get works. For example, if there is a group on a filter, then this will be transformed into an invisible attribute. In that case, the search view should simply ignore the filter and not display it. This was broken in the recent control panel refactoring (note that the search view lacked the possibility of testing that kind of situation). closes odoo/odoo#29430
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/views/control_panel/control_panel_view.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/control_panel/control_panel_view.js b/addons/web/static/src/js/views/control_panel/control_panel_view.js
index 3ba7afb2a60..3f89ad9f637 100644
--- a/addons/web/static/src/js/views/control_panel/control_panel_view.js
+++ b/addons/web/static/src/js/views/control_panel/control_panel_view.js
@@ -199,6 +199,9 @@ var ControlPanelView = Factory.extend({
var groupNumber = 1;
_.each(preFilters, function (preFilter) {
+ if (preFilter.attrs && preFilter.attrs.invisible) {
+ return;
+ }
if (preFilter.tag !== currentTag || _.contains(['separator', 'field'], preFilter.tag)) {
if (currentGroup.length) {
if (currentTag === 'groupBy') {