[fix] problem with reference fields

lp bug: https://launchpad.net/bugs/934330 fixed

bzr revid: nicolas.vanhoren@openerp.com-20120220100958-bujk0yuftdlzk3fz
This commit is contained in:
niv-openerp 2012-02-20 11:09:58 +01:00
parent 8036408be5
commit 571aac869c
2 changed files with 6 additions and 4 deletions

View File

@ -3147,7 +3147,11 @@ openerp.web.form.FieldReference = openerp.web.form.Field.extend({
},
start: function() {
this._super();
this.selection.$element = $(".oe_form_view_reference_selection", this.$element);
this.selection.render_element();
this.selection.start();
this.m2o.$element = $(".oe_form_view_reference_m2o", this.$element);
this.m2o.render_element();
this.m2o.start();
},
is_valid: function() {

View File

@ -1105,11 +1105,9 @@
<t t-name="FieldReference">
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="oe_frame oe_forms">
<tr>
<td t-attf-class="oe_form_frame_cell oe_form_selection #{widget.selection.element_class}">
<t t-raw="widget.selection.render()"/>
<td t-attf-class="oe_form_frame_cell oe_form_selection oe_form_view_reference_selection">
</td>
<td t-attf-class="oe_form_frame_cell oe_form_many2one #{widget.m2o.element_class}" nowrap="true" style="display: none">
<t t-raw="widget.m2o.render()"/>
<td t-attf-class="oe_form_frame_cell oe_form_many2one oe_form_view_reference_m2o" nowrap="true" style="display: none">
</td>
</tr>
</table>