Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • RPC calls in Python

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 77
    Comment on it

    In RPC we have to move on .py file and make script api to rpc call in python side after that move to function fetches the return value of the Python methods, converted to rpc call.For example see below code.

    session.rpc('/web/dataset/resequence', {
        model: some_model,
        ids: array_of_ids,
        offset: 42
    }).then(function (result) {
        // resequence didn't error out
    }, function () {
        // an error occured during during call
    });
    
    For instance, to call the resequence of the DataSet() controller:

    Note-it does not work if you want to call the Python side of Odoo Web.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: