[MEH] wheeeee

bzr revid: xmo@openerp.com-20120410115808-iiyx28ljvmke0i56
This commit is contained in:
Xavier Morel 2012-04-10 13:58:08 +02:00
parent 8fa309ea27
commit fecb5e108d
1 changed files with 11 additions and 12 deletions

View File

@ -3495,21 +3495,20 @@ openerp.web.form.FieldReference = openerp.web.form.AbstractField.extend(_.extend
} }
if (this.m2o) { if (this.m2o) {
this.m2o.destroy(); this.m2o.destroy();
this.m2o.undefined; this.m2o = undefined;
} }
}, },
initialize_content: function() { initialize_content: function() {
if (!this.get("effective_readonly")) { this.selection = new openerp.web.form.FieldSelection(this, { attrs: {
this.selection = new openerp.web.form.FieldSelection(this, { attrs: { name: 'selection',
name: 'selection', widget: 'selection'
widget: 'selection' }});
}}); this.selection.set({readonly: this.get('effective_readonly')});
this.selection.on_value_changed.add_last(this.on_selection_changed); this.selection.on_value_changed.add_last(this.on_selection_changed);
this.selection.$element = $(".oe_form_view_reference_selection", this.$element);
this.selection.$element = $(".oe_form_view_reference_selection", this.$element); this.selection.renderElement();
this.selection.renderElement(); this.selection.start();
this.selection.start();
}
this.m2o = new openerp.web.form.FieldMany2One(this, { attrs: { this.m2o = new openerp.web.form.FieldMany2One(this, { attrs: {
name: 'm2o', name: 'm2o',
widget: 'many2one' widget: 'many2one'