summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/data.js9
-rw-r--r--addons/web/static/src/js/views.js4
2 files changed, 6 insertions, 7 deletions
diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js
index a9a06400357..894bb4857b4 100644
--- a/addons/web/static/src/js/data.js
+++ b/addons/web/static/src/js/data.js
@@ -706,9 +706,8 @@ instance.web.DataSet = instance.web.CallbackEnabled.extend({
* @param {Function} error_callback
* @returns {$.Deferred}
*/
- call_button: function (method, args, callback, error_callback) {
- return this._model.call_button(method, args)
- .then(callback, error_callback);
+ call_button: function (method, args) {
+ return this._model.call_button(method, args);
},
/**
* Fetches the "readable name" for records, based on intrinsic rules
@@ -1043,7 +1042,7 @@ instance.web.BufferedDataSet = instance.web.DataSetStatic.extend({
}
return completion.promise();
},
- call_button: function (method, args, callback, error_callback) {
+ call_button: function (method, args) {
var id = args[0][0], index;
for(var i=0, len=this.cache.length; i<len; ++i) {
var record = this.cache[i];
@@ -1054,7 +1053,7 @@ instance.web.BufferedDataSet = instance.web.DataSetStatic.extend({
break;
}
}
- return this._super(method, args, callback, error_callback);
+ return this._super(method, args);
},
alter_ids: function(n_ids) {
this._super(n_ids);
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index 8a7fc52e02a..9e7db823bc0 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -1215,11 +1215,11 @@ instance.web.View = instance.web.Widget.extend({
}
}
args.push(context);
- return dataset.call_button(action_data.name, args, handler);
+ return dataset.call_button(action_data.name, args).then(handler);
} 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).then(handler(r));
+ return dataset.exec_workflow(record_id, action_data.name).then(handler);
}
},
/**