diff options
| author | Géry Debongnie <ged@odoo.com> | 2018-12-11 13:51:04 +0000 |
|---|---|---|
| committer | Christophe Monniez <moc@odoo.com> | 2019-01-06 16:54:29 +0000 |
| commit | 68eefe3ceece70919cb03c77ec187f7b84ece172 (patch) | |
| tree | b2101b2eda56dfd56ebf8d0a943df5736cf0be10 /addons/web/static/src/js/views/control_panel | |
| parent | 70f35620babdfdf43e2c603efbf37f2cf7399240 (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
cherry-pick of 13aae100e2bc0589e2313fd4105b39c0eeea4db0
closes odoo/odoo#29965
Diffstat (limited to 'addons/web/static/src/js/views/control_panel')
| -rw-r--r-- | addons/web/static/src/js/views/control_panel/control_panel_view.js | 3 |
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 0d842c4182d..381e5dcf7e5 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 @@ -197,6 +197,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') { |
