[IMP]remove callback from exec_workflow method and update related code.

bzr revid: vme@tinyerp.com-20120928094423-r7zpurqq0dbr6cyr
This commit is contained in:
Vidhin Mehta (OpenERP)
2012-09-28 15:14:23 +05:30
parent 6d692fac36
commit c768a2f226
2 changed files with 3 additions and 4 deletions
+2 -3
View File
@@ -751,10 +751,9 @@ instance.web.DataSet = instance.web.CallbackEnabled.extend({
[name], {context: this._model.context()})
.then(callback);
},
exec_workflow: function (id, signal, callback) {
exec_workflow: function (id, signal) {
return this._model.exec_workflow(id, signal)
.pipe(function (result) { return { result: result }; })
.then(callback);
.pipe(function (result) { return { result: result }; });
},
get_context: function(request_context) {
return this._model.context(request_context);
+1 -1
View File
@@ -1219,7 +1219,7 @@ instance.web.View = instance.web.Widget.extend({
} else if (action_data.type=="action") {
return this.rpc('/web/action/load', { action_id: action_data.name, context: context, do_not_eval: true}, handler);
} else {
return dataset.exec_workflow(record_id, action_data.name, handler);
return dataset.exec_workflow(record_id, action_data.name).then(handler(r));
}
},
/**