OdooRPC, a Python package, simplifies the control of Odoo servers via RPC (Remote Procedure Call). It offers features like accessing data model methods, utilizing named parameters, supporting user context for internationalization, browsing records, executing workflows, managing databases, and downloading reports. It is similar to JSON-RPC.
Installation:
pip3 install odoorpc
Connection to Odoo database:
import odoorpc
odoo = odoorpc.ODOO('localhost', port=8016)
print(odoo)
odoo.login(db='DemoDB', login='admin', password='admin')
print(odoo.env.user.name)
The following will be the result of this:
python3 json-test.py
< odoorpc.odoo.ODOO object at 0x7f55ec2a6bb0>
2
Mitchell Admin