diff options
| author | Xavier Morel <xmo@openerp.com> | 2012-11-29 12:24:13 +0100 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2012-11-29 12:24:13 +0100 |
| commit | fe3d493cc84583fbdd8da4917f9199fdef751dc0 (patch) | |
| tree | c28f1a156fbbae0a623b1c2e833bd7fcdeea0fc6 /addons/web/static/src/js | |
| parent | a2b23a1ca71a25f912c5f92e8a1dbfdde69bc568 (diff) | |
[FIX] searches with filters using "empty" domain/context values (but not attributes)
e.g. @domain="[]" would be seen as non-empty by the search view, and
if multiple domains the search view would generate a nonliteral
``['|', '[]', '[]]`` which would just yield ``['|']`` after evaluation
and concatenation, which is an invalid domain and would blow up the
server.
Specifically filter out the values ``[]`` and ``{}`` from filters
bzr revid: xmo@openerp.com-20121129112413-yrgncnesqs093jwf
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/search.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index 5b59c7d6912..3917f342391 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -1009,6 +1009,7 @@ instance.web.search.FilterGroup = instance.web.search.Input.extend(/** @lends in get_context: function (facet) { var contexts = facet.values.chain() .map(function (f) { return f.get('value').attrs.context; }) + .without('{}') .reject(_.isEmpty) .value(); @@ -1027,6 +1028,7 @@ instance.web.search.FilterGroup = instance.web.search.Input.extend(/** @lends in get_groupby: function (facet) { return facet.values.chain() .map(function (f) { return f.get('value').attrs.context; }) + .without('{}') .reject(_.isEmpty) .value(); }, @@ -1039,6 +1041,7 @@ instance.web.search.FilterGroup = instance.web.search.Input.extend(/** @lends in get_domain: function (facet) { var domains = facet.values.chain() .map(function (f) { return f.get('value').attrs.domain; }) + .without('[]') .reject(_.isEmpty) .value(); |
