From d31512342a11480a3b0b2860e7e79a9f70047c91 Mon Sep 17 00:00:00 2001 From: "Vidhin Mehta (OpenERP)" Date: Tue, 20 Dec 2011 17:41:35 +0530 Subject: [PATCH] [fix]fix bug 884207. lp bug: https://launchpad.net/bugs/884207 fixed bzr revid: vme@tinyerp.com-20111220121135-k0pwb4j3jzwrr1we --- addons/web/static/src/js/formats.js | 6 ++++-- addons/web/static/src/js/view_list.js | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/addons/web/static/src/js/formats.js b/addons/web/static/src/js/formats.js index 264cc836e2d..95301b05a74 100644 --- a/addons/web/static/src/js/formats.js +++ b/addons/web/static/src/js/formats.js @@ -253,13 +253,15 @@ openerp.web.format_cell = function (row_data, column, value_if_empty, process_mo if (attrs.invisible) { return ''; } if (column.tag === 'button') { return [ - '' ].join('') } - if (!row_data[column.id]) { return value_if_empty === undefined ? '' : value_if_empty; } diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 472001390e8..c8469eefe4d 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -557,6 +557,7 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# * @param {Function} callback should be called after the action is executed, if non-null */ do_button_action: function (name, id, callback) { + var self = this; var action = _.detect(this.columns, function (field) { return field.name === name; }); @@ -575,7 +576,9 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView# c.add(action.context); } action.context = c; - this.do_execute_action(action, this.dataset, id, callback); + this.do_execute_action(action, this.dataset, id, function(){ + self.o2m.view.reload(); + }); }, /** * Handles the activation of a record (clicking on it)