From antigravity-awesome-skills
Guides external app integration with Odoo via JSON-RPC and XML-RPC. Covers authentication, model CRUD, and provides ready-to-use Python, JavaScript, and curl examples.
How this skill is triggered — by the user, by Claude, or both
Slash command
/antigravity-awesome-skills:odoo-rpc-apiThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
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.
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.
@odoo-rpc-api and describe the integration you need.import xmlrpc.client
url = 'https://myodoo.example.com'
db = 'my_database'
username = 'admin'
password = 'my_api_key' # Use API keys, not passwords, in production
# Step 1: Authenticate
common = xmlrpc.client.ServerProxy(f'{url}/xmlrpc/2/common')
uid = common.authenticate(db, username, password, {})
print(f"Authenticated as UID: {uid}")
# Step 2: Call models
models = xmlrpc.client.ServerProxy(f'{url}/xmlrpc/2/object')
# Search confirmed sale orders
orders = models.execute_kw(db, uid, password,
'sale.order', 'search_read',
[[['state', '=', 'sale']]],
{'fields': ['name', 'partner_id', 'amount_total'], 'limit': 10}
)
for order in orders:
print(order)
new_partner_id = models.execute_kw(db, uid, password,
'res.partner', 'create',
[{'name': 'Acme Corp', 'email': '[email protected]', 'is_company': True}]
)
print(f"Created partner ID: {new_partner_id}")
curl -X POST https://myodoo.example.com/web/dataset/call_kw \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "call",
"id": 1,
"params": {
"model": "res.partner",
"method": "search_read",
"args": [[["is_company", "=", true]]],
"kwargs": {"fields": ["name", "email"], "limit": 5}
}
}'
# Note: "id" is required by the JSON-RPC 2.0 spec to correlate responses.
# Odoo 16+ also supports the /web/dataset/call_kw endpoint but
# prefer /web/dataset/call_kw for model method calls.
search_read instead of search + read to reduce network round trips..env file)./xmlrpc/2/) does not support file uploads — use the REST-based ir.attachment model via JSON-RPC for binary data.npx claudepluginhub sickn33/antigravity-awesome-skills --plugin antigravity-bundle-aas-mobile-app-builderGenerates code for Odoo's JSON-RPC and XML-RPC APIs: authentication, model calls, record CRUD using Python, JavaScript, curl. For external app integrations and data automation.
Provides Odoo 17 development references for Python models, ORM, XML views/data, OWL/JS client code, QWeb reports, security, cron actions, migrations, tests, and performance. Ideal for building, fixing, refactoring, or reviewing custom addons.
Scaffolds custom Odoo modules including __manifest__.py, models, views, security; guides inheritance, ORM patterns, onchange/compute methods, and troubleshooting.