[imp] improved floating state handling

bzr revid: nicolas.vanhoren@openerp.com-20110610132926-2kvljjzeezj24gjp
This commit is contained in:
niv-openerp
2011-06-10 15:29:26 +02:00
parent 5126d74a73
commit 4fb28eeb71
+4 -3
View File
@@ -1171,9 +1171,10 @@ openerp.base.form.FieldMany2One = openerp.base.form.Field.extend({
}
},
get_value: function() {
return this.value !== undefined ?
(this.value !== null ? this.value[0] : null) : undefined;
},
if (this.value === undefined)
throw "theorically unreachable state";
return this.value ? this.value[0] : null;
}
//TODO niv: add validation
});