From 83a264ff2b5d62fd25bba9873fdd08c0b5bf8df3 Mon Sep 17 00:00:00 2001
From: "vta vta@openerp.com" <>
Date: Tue, 6 Nov 2012 11:33:20 +0100
Subject: [PATCH] [FIX] Fixed list view widget as per xmo review.
bzr revid: vta@openerp.com-20121106103320-zyon6mzsy9jaafj0
---
addons/web/static/src/js/view_form.js | 4 ----
addons/web/static/src/js/view_list.js | 6 +-----
addons/web/static/src/xml/base.xml | 2 +-
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 @@
+ >