productivity
Odoo ERP CLI for AI Agents
Use the Odoo ERP CLI from KosmoKrator to call Odoo ERP tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Odoo ERP CLI Setup
Odoo ERP can be configured headlessly with `kosmokrator integrations:configure odoo`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure odoo --set api_key="$ODOO_API_KEY" --set url="$ODOO_URL" --enable --read allow --write ask --json
kosmokrator integrations:doctor odoo --json
kosmokrator integrations:status --json Credentials
Authentication type: API key api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
api_key | ODOO_API_KEY | Secret secret | yes | API Key |
url | ODOO_URL | URL url | yes | Odoo URL |
database | ODOO_DATABASE | Text string | no | Database Name |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call odoo.odoo_list_contacts '{"page":1,"limit":1,"name":"example_name","email":"example_email","is_company":true}' --json kosmo integrations:odoo odoo_list_contacts '{"page":1,"limit":1,"name":"example_name","email":"example_email","is_company":true}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs odoo --json
kosmo integrations:docs odoo.odoo_list_contacts --json
kosmo integrations:schema odoo.odoo_list_contacts --json
kosmo integrations:search "Odoo ERP" --json
kosmo integrations:list --json Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
odoo.odoo_list_contacts
List contacts (customers, vendors) from Odoo with pagination. Returns contact names, emails, phone numbers, and company info.
read - Parameters
- page, limit, name, email, is_company
kosmo integrations:call odoo.odoo_list_contacts '{"page":1,"limit":1,"name":"example_name","email":"example_email","is_company":true}' --json kosmo integrations:odoo odoo_list_contacts '{"page":1,"limit":1,"name":"example_name","email":"example_email","is_company":true}' --json odoo.odoo_get_contact
Get full details of a specific Odoo contact by ID. Returns name, email, phone, address, and all associated data.
read - Parameters
- id
kosmo integrations:call odoo.odoo_get_contact '{"id":1}' --json kosmo integrations:odoo odoo_get_contact '{"id":1}' --json odoo.odoo_create_contact
Create a new contact (customer or vendor) in Odoo. Supports individuals and companies.
write - Parameters
- name, email, phone, is_company, company_type, street, city, zip, country, website, vat, type, parent_id, function
kosmo integrations:call odoo.odoo_create_contact '{"name":"example_name","email":"example_email","phone":"example_phone","is_company":true,"company_type":"example_company_type","street":"example_street","city":"example_city","zip":"example_zip"}' --json kosmo integrations:odoo odoo_create_contact '{"name":"example_name","email":"example_email","phone":"example_phone","is_company":true,"company_type":"example_company_type","street":"example_street","city":"example_city","zip":"example_zip"}' --json odoo.odoo_list_sales_orders
List sales orders from Odoo with pagination. Filter by status, customer, or date range.
read - Parameters
- page, limit, status, partner_id, date_from, date_to
kosmo integrations:call odoo.odoo_list_sales_orders '{"page":1,"limit":1,"status":"example_status","partner_id":1,"date_from":"example_date_from","date_to":"example_date_to"}' --json kosmo integrations:odoo odoo_list_sales_orders '{"page":1,"limit":1,"status":"example_status","partner_id":1,"date_from":"example_date_from","date_to":"example_date_to"}' --json odoo.odoo_list_invoices
List invoices from Odoo with pagination. Filter by status, customer, or date range.
read - Parameters
- page, limit, status, partner_id, date_from, date_to
kosmo integrations:call odoo.odoo_list_invoices '{"page":1,"limit":1,"status":"example_status","partner_id":1,"date_from":"example_date_from","date_to":"example_date_to"}' --json kosmo integrations:odoo odoo_list_invoices '{"page":1,"limit":1,"status":"example_status","partner_id":1,"date_from":"example_date_from","date_to":"example_date_to"}' --json odoo.odoo_list_products
List products from Odoo with pagination. Filter by name, category, or type.
read - Parameters
- page, limit, name, category, type, sale_ok, purchase_ok
kosmo integrations:call odoo.odoo_list_products '{"page":1,"limit":1,"name":"example_name","category":"example_category","type":"example_type","sale_ok":true,"purchase_ok":true}' --json kosmo integrations:odoo odoo_list_products '{"page":1,"limit":1,"name":"example_name","category":"example_category","type":"example_type","sale_ok":true,"purchase_ok":true}' --json odoo.odoo_list_leads
List CRM leads and opportunities from Odoo with pagination. Filter by stage, type, or assigned user.
read - Parameters
- page, limit, type, stage, user_id, partner_id
kosmo integrations:call odoo.odoo_list_leads '{"page":1,"limit":1,"type":"example_type","stage":"example_stage","user_id":1,"partner_id":1}' --json kosmo integrations:odoo odoo_list_leads '{"page":1,"limit":1,"type":"example_type","stage":"example_stage","user_id":1,"partner_id":1}' --json odoo.odoo_get_current_user
Get the currently authenticated Odoo user profile. Returns name, email, role, and company information.
read - Parameters
- none
kosmo integrations:call odoo.odoo_get_current_user '{}' --json kosmo integrations:odoo odoo_get_current_user '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
odoo.odoo_list_contacts 5 parameters
kosmo integrations:schema odoo.odoo_list_contacts --json | Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1). |
limit | integer | no | Number of contacts per page (default: 20, max: 100). |
name | string | no | Filter contacts by name (partial match). |
email | string | no | Filter contacts by email (partial match). |
is_company | boolean | no | Filter to only companies (true) or individuals (false). |
odoo.odoo_get_contact 1 parameters
kosmo integrations:schema odoo.odoo_get_contact --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | yes | The Odoo contact ID. |
odoo.odoo_create_contact 14 parameters
kosmo integrations:schema odoo.odoo_create_contact --json | Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Full name of the contact. |
email | string | no | Email address. |
phone | string | no | Phone number. |
is_company | boolean | no | Whether this is a company record (default: false). |
company_type | string | no | "company" or "person" (default: "person"). |
street | string | no | Street address. |
city | string | no | City. |
zip | string | no | Postal / ZIP code. |
country | string | no | Country name or code. |
website | string | no | Website URL. |
vat | string | no | Tax ID / VAT number. |
type | string | no | Contact type: "contact", "invoice", "delivery", or "other" (default: "contact"). |
parent_id | integer | no | Parent company ID for subsidiary contacts. |
function | string | no | Job position / title. |
odoo.odoo_list_sales_orders 6 parameters
kosmo integrations:schema odoo.odoo_list_sales_orders --json | Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1). |
limit | integer | no | Number of orders per page (default: 20, max: 100). |
status | string | no | Filter by status: "draft", "sent", "sale", "done", or "cancel". |
partner_id | integer | no | Filter by customer (partner) ID. |
date_from | string | no | Filter orders from this date (ISO 8601, e.g., "2025-01-01"). |
date_to | string | no | Filter orders up to this date (ISO 8601, e.g., "2025-12-31"). |
odoo.odoo_list_invoices 6 parameters
kosmo integrations:schema odoo.odoo_list_invoices --json | Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1). |
limit | integer | no | Number of invoices per page (default: 20, max: 100). |
status | string | no | Filter by status: "draft", "posted", or "cancel". |
partner_id | integer | no | Filter by customer (partner) ID. |
date_from | string | no | Filter invoices from this date (ISO 8601, e.g., "2025-01-01"). |
date_to | string | no | Filter invoices up to this date (ISO 8601, e.g., "2025-12-31"). |
odoo.odoo_list_products 7 parameters
kosmo integrations:schema odoo.odoo_list_products --json | Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1). |
limit | integer | no | Number of products per page (default: 20, max: 100). |
name | string | no | Filter products by name (partial match). |
category | string | no | Filter by product category name. |
type | string | no | Filter by type: "consumable", "service", or "product". |
sale_ok | boolean | no | Filter to products that can be sold (true) or not (false). |
purchase_ok | boolean | no | Filter to products that can be purchased (true) or not (false). |
odoo.odoo_list_leads 6 parameters
kosmo integrations:schema odoo.odoo_list_leads --json | Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1). |
limit | integer | no | Number of leads per page (default: 20, max: 100). |
type | string | no | Filter by type: "lead" or "opportunity". |
stage | string | no | Filter by stage name (e.g., "New", "Qualified", "Won", "Lost"). |
user_id | integer | no | Filter by assigned salesperson (user ID). |
partner_id | integer | no | Filter by customer (partner) ID. |
odoo.odoo_get_current_user 0 parameters
kosmo integrations:schema odoo.odoo_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults with
integrations:configure. Add --force only for trusted automation that should bypass that policy.