Development Book V18: Odoo RPC library (OCA)

OdooRPC is a Python library that streamlines interaction with Odoo servers through Remote Procedure Calls (RPC). It provides a wide range of features, including access to data model methods, support for named parameters, user context handling for internationalization, record browsing, workflow execution, database management, and report downloading. Its functionality closely resembles that of JSON-RPC, making it a powerful tool for remote Odoo integrations.

To interact with an Odoo 18 server using Python, first install the OdooRPC library via pip:

pip install OdooRPC

Once installed, you can establish a connection to your Odoo 18 instance using the following steps:

import odoorpc

# Connect to the Odoo server
odoo = odoorpc.ODOO('localhost', port=8069)

# Authenticate
odoo.login('your_database_name', 'your_username', 'your_password')
  • 'localhost': Replace with the actual host (e.g., '192.168.1.100' or a domain).
  • port=8069: Default Odoo port; change it if your server uses a different one.
  • 'your_database_name': Name of the Odoo database.
  • 'your_username': Odoo login username.
  • 'your_password': Corresponding password.
whatsapp_icon
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