diff options
| author | Denis Ledoux <dle@odoo.com> | 2015-01-30 13:39:02 +0100 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2015-01-30 13:40:31 +0100 |
| commit | a804d9a70f4288cde4d08d6dc0970a2b0c495b6a (patch) | |
| tree | 6a6ae916320a39e7344db6f6bf24b070b7422eb0 /addons/web/static/src | |
| parent | 4c2706d6858c4b7ec6db4b647dc2e3559f650cd8 (diff) | |
[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.
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/search.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index d2db5b55213..3ac03cf4052 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -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) { |
