I want to make a request to an external API when I create a record. It's possible to do that using python code in automated actions? or what's the best approach in order to get that?
🖖
PD: I have zero experience in Odoo development. But I'm a developer ;)
Hello Belmar,
To extend onto Husain's answer, regarding documentation, you want to look at building a module to install into Odoo.
https://www.odoo.com/documentation/14.0/howtos/backend.html
You will need to extend a model which would depend on where you want to call the API request. Specifically defined here in the documentation:
https://www.odoo.com/documentation/14.0/howtos/backend.html#model-inheritance
Once you have the function defined on the model, you are able to call this function in the automated action. Just choose python execution and you have selected the same model you have extended and write the code "record.your_function()".
I hope this explains how to achieve this better.
Thanks,