[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:
parent
293677bdc9
commit
6dc3b76255
|
@ -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});
|
||||
|
|
Loading…
Reference in New Issue