summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorMathieu Duckerts-Antoine <dam@odoo.com>2020-05-03 09:34:57 +0000
committerMathieu Duckerts-Antoine <dam@odoo.com>2020-05-05 12:04:19 +0000
commit9c2a0f1db7654b2822b0c6c2703be3583fd92428 (patch)
treeae515533a60e7a30e3a0b3a4383dfdb0079cedc6 /addons/web/static/src
parenta8c54b40cd7db9b417764a17624bd1362ae38d63 (diff)
[FIX] web: no confusion betweed false and 'false'
In the search panel, if a select multi was grouped by a field that can take the value 'false' (like a char field), that value would be confused with the value false and the group 'false' would never be displayed (its values would be put in the group false). This commit avoids that situation by using JSON.stringify instead of the implicit stringification done when using a value as an object key. closes odoo/odoo#50647 X-original-commit: 5b19e6c13b636d108e8aa1a09f01124fdb38a577 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/search_panel.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/search_panel.js b/addons/web/static/src/js/views/search_panel.js
index 6a1d8381fb7..b15411da2a7 100644
--- a/addons/web/static/src/js/views/search_panel.js
+++ b/addons/web/static/src/js/views/search_panel.js
@@ -349,9 +349,9 @@ var SearchPanel = Widget.extend({
if (filter.groupBy) {
var groups = {};
values.forEach(function (value) {
- var groupId = value.group_id;
+ var groupId = JSON.stringify(value.group_id);
if (!groups[groupId]) {
- if (groupId) {
+ if (groupId !== 'false') {
groupIds.push(groupId);
}
groups[groupId] = {