[FIX] correctly handle 'false' value on selection fields

bzr revid: xmo@openerp.com-20111006145439-mklud8aaezmd2b1p
This commit is contained in:
Xavier Morel 2011-10-06 16:54:39 +02:00
parent bfb7cb0d6e
commit 404db3a08b
1 changed files with 3 additions and 1 deletions

View File

@ -781,7 +781,9 @@ openerp.web.search.SelectionField = openerp.web.search.Field.extend(/** @lends o
get_value: function () {
var index = parseInt(this.$element.val(), 10);
if (isNaN(index)) { return null; }
return this.attrs.selection[index][0];
var value = this.attrs.selection[index][0];
if (value === false) { return null; }
return value;
}
});
openerp.web.search.BooleanField = openerp.web.search.SelectionField.extend(/** @lends openerp.web.search.BooleanField# */{