From sales
Handles Odoo JSON-RPC operations through the `odoo` CLI, including authentication, model and field inspection, record querying, CRUD operations, and arbitrary model method execution.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sales:odoorpc-cliThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A lightweight command-line interface for interacting with Odoo through JSON-RPC.
A lightweight command-line interface for interacting with Odoo through JSON-RPC.
odoo simplifies common Odoo operations directly from the terminal, including authentication, model inspection, record management, and method execution.
Install the package using pip:
pip install odoorpc-cli
Verify the installation:
odoo --version
| Category | Command | Description |
|---|---|---|
| Authentication | odoo auth login | Authenticate with the Odoo server |
| Authentication | odoo auth logout | Logout from the Odoo server |
| Authentication | odoo auth info | Show current authentication details |
| Search | odoo search read | Search and retrieve records |
| Search | odoo search count | Count matching records |
| Model | odoo model search | Search available models |
| Model | odoo model field | Display model field metadata |
| Records | odoo create | Create new records |
| Records | odoo write | Update existing records |
| Records | odoo unlink | Delete records |
| Methods | odoo call-method | Execute arbitrary model methods |
Check the current authenticated session:
odoo auth info
If authentication has not been configured, ask user for authentication credentials but suggest user to authenticate by himself by running:
odoo auth login
If user let you know the credentials, you can also provide them directly as arguments:
odoo auth login --host <host> --db <database> --username <username> --password <password>
Search for records matching a domain and return selected fields.
odoo search read <model> --domain '<domain-json>' --fields <field1,field2> --order '<field dir>' --offset N --limit N
| Option | Default | Description |
|---|---|---|
--domain | [] | JSON array Odoo domain filter |
--fields | all | Comma-separated fields; all returns only id |
--order | None | Sort expression, e.g. name asc or id desc |
--offset | 0 | Number of records to skip (for pagination) |
--limit | None | Maximum number of records to return |
odoo search read res.partner \
--domain '[["name", "ilike", "Acme"]]' \
--fields name,email \
--order 'name asc' \
--offset 0 \
--limit 10
# Page 1
odoo search read res.partner --fields name,email --limit 20 --offset 0
# Page 2
odoo search read res.partner --fields name,email --limit 20 --offset 20
Return the number of records matching a domain.
odoo search count <model> --domain '<domain-json>'
odoo search count res.partner \
--domain '[["is_company", "=", true]]'
Find models by technical name or keyword.
odoo model search <query>
odoo model search partner
Display metadata for all fields in a model.
odoo model field <model>
odoo model field res.partner
Create one or more records in a model.
odoo create <model> --values '<json-list>'
odoo create res.partner \
--values '[{"name": "New Co", "email": "[email protected]"}]'
--values must be a JSON array containing one or more record objects.
Update existing records by ID or domain.
odoo write <model> --ids '<id[,id...]>' --value '<json-object>'
odoo write <model> --domain '<domain-json>' --value '<json-object>' --limit N
Update a single record by id:
odoo write res.partner \
--ids '42' \
--value '{"name": "Renamed Co"}'
Update multiple records by id:
odoo write res.partner \
--ids '41,42' \
--value '{"active": false}'
Update records by domain:
odoo write res.partner \
--domain '[ ["name","ilike","Acme"] ]' \
--value '{"active": false}' \
--limit 10
--ids accepts comma-separated IDs--value must be a JSON object--domain accepts a JSON array (Odoo domain) and is resolved to matching IDs; use --limit to bound results when using --domain. When both --id and --domain are provided, the union of IDs will be used.Delete records from a model.
odoo unlink <model> --ids '<id[,id...]>'
odoo unlink <model> --domain '<domain-json>' --limit N
odoo unlink res.partner --ids '99'
Delete records by domain:
odoo unlink res.partner \
--domain '[["is_company","=",true]]' \
--limit 50
--ids accepts comma-separated IDs--domain accepts a JSON array (Odoo domain). Use --limit to bound results when using --domain.--ids and --domain are provided, the union of IDs will be used.Execute arbitrary model methods with positional and keyword arguments.
odoo call-method <model> \
--method <method_name> \
--args '<json-list>' \
--kwargs '<json-object>'
odoo call-method res.partner \
--method name_get \
--args '[42]'
odoo call-method sale.order \
--method action_confirm \
--args '[1]' \
--kwargs '{}'
Several commands accept JSON input. The CLI validates the structure before execution.
| Argument | Expected Type |
|---|---|
--domain | JSON array |
--values | JSON array |
--value | JSON object |
--args | JSON array |
--kwargs | JSON object |
Wrap JSON with single quotes:
--domain '[["name", "=", "O'\''Reilly"]]'
Remove trailing commas from arrays and objects.
Always quote JSON arguments.
Ensure:
Re-authenticate if necessary:
odoo auth login
Check:
# Authenticate
odoo auth login
# Search records
odoo search read res.partner \
--domain '[["is_company", "=", true]]' \
--fields name,email
# Create a record
odoo create res.partner \
--values '[{"name": "Example Co"}]'
# Update a record
odoo write res.partner \
--ids '42' \
--value '{"active": false}'
# Delete a record
odoo unlink res.partner --ids '42'
npx claudepluginhub jakapolr/roots-sales-plugin --plugin salesCreates bite-sized, testable implementation plans from specs or requirements, with file structure and task decomposition. Activates before coding multi-step tasks.