Development Book V17:Odoo RPC library (OCA)

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
whatsapp
location

Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635

location

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

location

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message