The Odoo server supports Remote procedure calls (RPC), which means that you can connect Odoo instances from external applications. With the Odoo RPC API, you can perform any CRUD operations on a database. Odoo RPC is not limited to CRUD operations; you can also invoke public methods of any model. Of course, you will need to have proper access to rights to perform these operations because RPC respects all of the access rights and record rules you have defined in your database. Consequently, it is very safe to use. Odoo RPC is not platform-dependant, so you can use it on any platform, including Odoo.sh, online, or self-hosted platforms. Odoo RPC can be used with any programming language so you can integrate Odoo with any external application.
Odoo provides two types of RPC API—XML-RPC and JSON-RPC. In this recipe, we will learn how to use these...