The OCA odoorpc library
The Odoo Community Association (OCA) provides a Python library called odoorpc
. This is available at https://github.com/OCA/odoorpc. The odoorpc
library provides a user-friendly syntax from which to access Odoo data through RPC. It provides a similar syntax to the server. In this recipe, we will see how you can use the odoorpc
library to perform operations through RPC.
Getting ready
The odoorpc
library is registered on the Python package (PyPI
) index. In order to use the library, you need to install it with the following command. You can use this in a separate virtual environment if you want:
pip install OdooRPC
In this recipe, we will perform some basic operations using the odoorpc
library. We will use the library.book
model to perform these operations. Make sure you have installed the my_library
module and that the server is running on http://localhost:8069
.
How to do it...
Perform the following steps to create, write, and update a book&apos...