Skip to content

Commit

Permalink
[FIX] Fixed list view widget as per xmo review.
Browse files Browse the repository at this point in the history
bzr revid: vta@openerp.com-20121106103320-zyon6mzsy9jaafj0
  • Loading branch information
vta vta@openerp.com committed Nov 6, 2012
1 parent 492379e commit 83a264f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
4 changes: 0 additions & 4 deletions addons/web/static/src/js/view_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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();
}
},
});

Expand Down
6 changes: 1 addition & 5 deletions addons/web/static/src/js/view_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -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});
},
});
Expand Down
2 changes: 1 addition & 1 deletion addons/web/static/src/xml/base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down

0 comments on commit 83a264f

Please sign in to comment.