[FIX] Use call_button in order to have the action cleaned by the controller

bzr revid: fme@openerp.com-20120904133137-0e0gyu69p89yx3sr
This commit is contained in:
Fabien Meghazi 2012-09-04 15:31:37 +02:00
parent 203f4636d5
commit c0d92e38b1
1 changed files with 3 additions and 3 deletions

View File

@ -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);
});
},
});