[FIX] m2o's get_value() should return false when internal value is null

bzr revid: fme@openerp.com-20110627113221-br4h8hfedzbbhd22
This commit is contained in:
Fabien Meghazi
2011-06-27 13:32:21 +02:00
parent 3f543ba20a
commit 798cf867f6
+1 -1
View File
@@ -1303,7 +1303,7 @@ openerp.base.form.FieldMany2One = openerp.base.form.Field.extend({
if (this.tmp_value instanceof Array) {
return this.tmp_value[0];
}
return this.tmp_value;
return this.tmp_value === null ? false : this.tmp_value;
}
if (this.value === undefined)
throw "theorically unreachable state";