KosmoKrator

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, configure, and verify
# 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.

KeyEnv varTypeRequiredLabel
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.

Generic CLI call
kosmo integrations:call odoo.odoo_list_contacts '{"page":1,"limit":1,"name":"example_name","email":"example_email","is_company":true}' --json
Provider shortcut
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.

Discovery commands
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 read
Parameters
page, limit, name, email, is_company
Generic call
kosmo integrations:call odoo.odoo_list_contacts '{"page":1,"limit":1,"name":"example_name","email":"example_email","is_company":true}' --json
Shortcut
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 read
Parameters
id
Generic call
kosmo integrations:call odoo.odoo_get_contact '{"id":1}' --json
Shortcut
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 write
Parameters
name, email, phone, is_company, company_type, street, city, zip, country, website, vat, type, parent_id, function
Generic call
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
Shortcut
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 read
Parameters
page, limit, status, partner_id, date_from, date_to
Generic call
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
Shortcut
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 read
Parameters
page, limit, status, partner_id, date_from, date_to
Generic call
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
Shortcut
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 read
Parameters
page, limit, name, category, type, sale_ok, purchase_ok
Generic call
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
Shortcut
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 read
Parameters
page, limit, type, stage, user_id, partner_id
Generic call
kosmo integrations:call odoo.odoo_list_leads '{"page":1,"limit":1,"type":"example_type","stage":"example_stage","user_id":1,"partner_id":1}' --json
Shortcut
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 read
Parameters
none
Generic call
kosmo integrations:call odoo.odoo_get_current_user '{}' --json
Shortcut
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
Schema command
kosmo integrations:schema odoo.odoo_list_contacts --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema odoo.odoo_get_contact --json
ParameterTypeRequiredDescription
id integer yes The Odoo contact ID.
odoo.odoo_create_contact 14 parameters
Schema command
kosmo integrations:schema odoo.odoo_create_contact --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema odoo.odoo_list_sales_orders --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema odoo.odoo_list_invoices --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema odoo.odoo_list_products --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema odoo.odoo_list_leads --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema odoo.odoo_get_current_user --json
ParameterTypeRequiredDescription
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.