[FIX] Fixed list view widget as per xmo review.
bzr revid: vta@openerp.com-20121106103320-zyon6mzsy9jaafj0
This commit is contained in:
parent
492379e6c4
commit
83a264ff2b
|
@ -3170,7 +3170,6 @@ instance.web.form.Many2OneButton = instance.web.form.AbstractField.extend({
|
|||
},
|
||||
on_click: function(ev) {
|
||||
var self = this;
|
||||
ev.stopPropagation();
|
||||
var popup = new instance.web.form.FormOpenPopup(this);
|
||||
popup.show_element(
|
||||
this.field.relation,
|
||||
|
@ -3190,9 +3189,6 @@ instance.web.form.Many2OneButton = instance.web.form.AbstractField.extend({
|
|||
value_ = value_ || false;
|
||||
this.set('value', value_);
|
||||
this.set_button();
|
||||
if (this.is_started) {
|
||||
this.render_value();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -2200,11 +2200,7 @@ instance.web.list.Handle = instance.web.list.Column.extend({
|
|||
});
|
||||
instance.web.list.Many2OneButton = instance.web.list.Column.extend({
|
||||
_format: function (row_data, options) {
|
||||
if (row_data.voucher_id.value) {
|
||||
this.icon = '/web/static/src/img/icons/gtk-yes.png';
|
||||
} else {
|
||||
this.icon = '/web/static/src/img/icons/gtk-no.png';
|
||||
}
|
||||
this.has_value = !!row_data[this.id].value;
|
||||
return QWeb.render('Many2OneButton.cell', {'widget': this});
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1034,7 +1034,7 @@
|
|||
</span>
|
||||
</t>
|
||||
<t t-name="Many2OneButton.cell"
|
||||
><img t-if="widget.icon" t-att-src="_s + widget.icon" width="16" height="16"/>
|
||||
><img t-attf-src="#{_s}/web/static/src/img/icons/gtk-#{widget.has_value ? 'yes' : 'no'}.png" width="16" height="16"/>
|
||||
</t>
|
||||
<t t-name="FieldMany2ManyTags">
|
||||
<div class="oe_form_field oe_tags" t-att-style="widget.node.attrs.style">
|
||||
|
|
Loading…
Reference in New Issue