[IMP] in dialog box 'Set Default', for many2one fields, show display_name instead of value (id)

bzr revid: rco@openerp.com-20120719081914-lchgb4k409fam1te
This commit is contained in:
Raphael Collet 2012-07-19 10:19:14 +02:00
parent 293677bdc9
commit 6dc3b76255
1 changed files with 6 additions and 0 deletions

View File

@ -865,6 +865,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
return option[0] === value;
})[1];
break;
case 'many2one':
displayed = field.get_displayed();
break;
}
return {
@ -2781,6 +2784,9 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
this._super(value_);
this.inhibit_on_change = false;
},
get_displayed: function() {
return this.display_value["" + this.get("value")];
},
add_id: function(id) {
this.display_value = {};
this.set({value: id});