From c0d92e38b15c6c7dbc662a307fd1e3e259e9469a Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Tue, 4 Sep 2012 15:31:37 +0200 Subject: [PATCH] [FIX] Use call_button in order to have the action cleaned by the controller bzr revid: fme@openerp.com-20120904133137-0e0gyu69p89yx3sr --- addons/web/static/src/js/view_form.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index b0c8b6618ae..a53807a9d79 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -1997,9 +1997,9 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w }, on_translate: function() { var self = this; - var trans = new instance.web.DataSet(this, 'ir.translation', this.view.dataset.get_context()); - return trans.call('translate_fields', [this.view.dataset.model, this.view.datarecord.id, this.name]).then(function(action) { - self.do_action(action); + var trans = new instance.web.DataSet(this, 'ir.translation'); + return trans.call_button('translate_fields', [this.view.dataset.model, this.view.datarecord.id, this.name, this.view.dataset.get_context()]).then(function(r) { + self.do_action(r.result); }); }, });