Odoo Help


Calling server method asynchronously

on 1/5/16, 1:25 PM 486 views


I have a time consuming server method that needs to be run asynchronously so user can keep working on something else while method is running on the backend.

Currently I am doing it thru a cron job, but now I need to call the method per user request thru a form button.

I tried JS RPC high-level API thru XML button; py method is run but still UI gets held upon method completion.

This is the JS I am running.



openerp.my_addon = function (instance,action) {

instance.web.client_actions.add('my.addon.validate.action', 'instance.my_addon.validate_action');

instance.my_addon.validate_action = function (parent, action) {

var active_id = action.context.active_id;

   var MyModel = new instance.web.Model('my.model');
MyModel.call("call_model_method", [[active_id]]);

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/5/16, 1:25 PM
Seen: 486 times
Last updated: 1/5/16, 1:31 PM