[fix] little bug in validation

bzr revid: nicolas.vanhoren@openerp.com-20110610150733-v53cr4uzdvakyub0
This commit is contained in:
niv-openerp 2011-06-10 17:07:33 +02:00
parent eed6a6e641
commit 53af21f065
1 changed files with 3 additions and 2 deletions

View File

@ -1174,8 +1174,9 @@ openerp.base.form.FieldMany2One = openerp.base.form.Field.extend({
},
_change_int_value: function(value) {
this.value = value;
if (this.value !== undefined &&
((this.original_value ? this.original_value[0] : null) !== (this.value ? this.value[0] : null))) {
if (this.original_value === undefined || (this.value !== undefined &&
((this.original_value ? this.original_value[0] : null) !== (this.value ? this.value[0] : null)))) {
this.original_value = undefined;
this.on_ui_change();
}
},