| name | odoo-rpc-api |
| description | Expert on Odoo's external JSON-RPC and XML-RPC APIs. Covers authentication, model calls, record CRUD, and real-world integration examples in Python, JavaScript, and curl. |
| type | skill |
| created | 2026-02-27T00:00:00.000Z |
| domain | software-development |
| category | languages |
| risk | safe |
| source | self |
| tags | ["skill","software-development","languages","odoo","rpc","api"] |
Odoo RPC API
Overview
Odoo exposes a powerful external API via JSON-RPC and XML-RPC, allowing any external application to read, create, update, and delete records. This skill guides you through authenticating, calling models, and building robust integrations.
When to Use This Skill
- Connecting an external app (e.g., Django, Node.js, a mobile app) to Odoo.
- Running automated scripts to import/export data from Odoo.
- Building a middleware layer between Odoo and a third-party platform.
- Debugging API authentication or permission errors.
How It Works
- Activate: Mention
@odoo-rpc-api and describe the integration you need.
- Generate: Get copy-paste ready RPC call code in Python, JavaScript, or curl.
- Debug: Paste an error and get a diagnosis with a corrected call.
Examples
Example 1: Authenticate and Read Records (Python)
import xmlrpc.client
url = 'https://myodoo.example.com'
db = 'my_database'
username = 'admin'
password = 'my_api_key'
common = xmlrpc.client.ServerProxy(f'{url}/xmlrpc/2/common')
uid = common.authenticate(db, username, password, {})
print(f"Authenticated as UID: {uid}")
models = xmlrpc.client.ServerProxy(f'{url}/xmlrpc/2/object')
orders = models.execute_kw(db, uid, password,
'sale.order', 'search_read',
[[['state', '=', 'sale']]],
{'fields': ['name', 'partner_id', 'amount_total'], 'limit': 10}
)
order orders:
(order)