[IMP]remove callback from exec_workflow method and update related code.
bzr revid: vme@tinyerp.com-20120928094423-r7zpurqq0dbr6cyr
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user