[FIX] web: possibility to autocomplete 'No' for boolean fields
In the search bar. Besides, if the label value of the selection field is set to False, which is quite dummy but accepted The autocomplete crashed.
This commit is contained in:
@@ -1453,7 +1453,7 @@ instance.web.search.SelectionField = instance.web.search.Field.extend(/** @lends
|
||||
var results = _(this.attrs.selection).chain()
|
||||
.filter(function (sel) {
|
||||
var value = sel[0], label = sel[1];
|
||||
if (!value) { return false; }
|
||||
if (value === undefined || !label) { return false; }
|
||||
return label.toLowerCase().indexOf(needle.toLowerCase()) !== -1;
|
||||
})
|
||||
.map(function (sel) {
|
||||
|
||||
Reference in New Issue
Block a user