[FIX] web: field radio empty value

The get_value method of field radio returned sometines an undefined
value (while it is expected to return false is there is no value).

This caused traceback for siblings fields trying to access the value
of an empty field radio (onchange, ...).
This commit is contained in:
qsm-odoo
2015-09-21 16:21:14 +02:00
parent a88fae84e4
commit 3807733be6
@@ -1020,7 +1020,7 @@ var FieldRadio = common.AbstractField.extend(common.ReinitializeFieldMixin, {
},
get_value: function () {
var value = this.get('value');
return value instanceof Array ? value[0] : value;
return ((value instanceof Array)? value[0] : value) || false;
},
render_value: function () {
var self = this;