summaryrefslogtreecommitdiff
path: root/addons/web/static
diff options
context:
space:
mode:
authorvta vta@openerp.com <>2012-11-06 11:33:20 +0100
committervta vta@openerp.com <>2012-11-06 11:33:20 +0100
commit83a264ff2b5d62fd25bba9873fdd08c0b5bf8df3 (patch)
tree6cfecd47d3c06fecaa1db1ef2c7f31a59d169531 /addons/web/static
parent492379e6c4155108c226d973a3268d0d5a7c8994 (diff)
[FIX] Fixed list view widget as per xmo review.
bzr revid: vta@openerp.com-20121106103320-zyon6mzsy9jaafj0
Diffstat (limited to 'addons/web/static')
-rw-r--r--addons/web/static/src/js/view_form.js4
-rw-r--r--addons/web/static/src/js/view_list.js6
-rw-r--r--addons/web/static/src/xml/base.xml2
3 files changed, 2 insertions, 10 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 0b9b5d99b9e..9a8f734d2da 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -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();
- }
},
});
diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js
index 216ad7ded6c..871d2bc856f 100644
--- a/addons/web/static/src/js/view_list.js
+++ b/addons/web/static/src/js/view_list.js
@@ -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});
},
});
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index fe64c1c0efa..b3c09b0359b 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -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">