简体   繁体   中英

Send email for sign request via API Odoo

To consume the Odoo API (XML/RPC) in Python, you code the way you send odoo the model, then the method in the model and finally the arguments to the method:

api.execute_kw(database, uid, api_key, "model", "method", method_args)

It results executing something like this on server side:

model.method(1234)

I'm making a Python client to send document sign requests via email To get the calls I enabled debug mode in the conf file, recreate the steps to upload a document, and then send the email; finally implement the appropiate calls in my client.

Now, from my Python client, I can upload the pdf document and create the email message, my issue is trying to tell Odoo to send the message.

Odoo has its own API client to this, watching the log when send the email, I got this:

DEBUG odoo_data odoo.api: call sign.send.request(1234,).send_request()

The structure of coe here changes

ir.model(1234,).method()

The argument '1234' is sent to the Object at instantiate time.

How can implement this code with my API client:

I tried to use normally and it works, there's no special treatment with that.

api.execute_kw(database,uid,api_key, "sign.send.request","send_request",[1234])

In my case, when use the method 'send_request', the Odoo server log shows this:

DEBUG odoo_data odoo.api: call sign.send.request(1234,).send_request()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM