KosmoKrator

erp

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.

8 functions 7 read 1 write API key auth

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 use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

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

Call Odoo ERP Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call odoo.odoo_list_contacts '{
  "page": 1,
  "limit": 1,
  "name": "example_name",
  "email": "example_email",
  "is_company": true
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:odoo odoo_list_contacts '{
  "page": 1,
  "limit": 1,
  "name": "example_name",
  "email": "example_email",
  "is_company": true
}' --json

Agent Discovery Commands

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

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Odoo ERP.

odoo.odoo_list_contacts

Read read

List contacts (customers, vendors) from Odoo with pagination. Returns contact names, emails, phone numbers, and company info.

Parameters
page, limit, name, email, is_company

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

odoo.odoo_get_contact

Read read

Get full details of a specific Odoo contact by ID. Returns name, email, phone, address, and all associated data.

Parameters
id

Generic CLI call

kosmo integrations:call odoo.odoo_get_contact '{"id":1}' --json

Provider shortcut

kosmo integrations:odoo odoo_get_contact '{"id":1}' --json

odoo.odoo_create_contact

Write write

Create a new contact (customer or vendor) in Odoo. Supports individuals and companies.

Parameters
name, email, phone, is_company, company_type, street, city, zip, country, website, vat, type, parent_id, function

Generic CLI 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

Provider 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

Read read

List sales orders from Odoo with pagination. Filter by status, customer, or date range.

Parameters
page, limit, status, partner_id, date_from, date_to

Generic CLI 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

Provider 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

Read read

List invoices from Odoo with pagination. Filter by status, customer, or date range.

Parameters
page, limit, status, partner_id, date_from, date_to

Generic CLI 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

Provider 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

Read read

List products from Odoo with pagination. Filter by name, category, or type.

Parameters
page, limit, name, category, type, sale_ok, purchase_ok

Generic CLI 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

Provider 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

Read read

List CRM leads and opportunities from Odoo with pagination. Filter by stage, type, or assigned user.

Parameters
page, limit, type, stage, user_id, partner_id

Generic CLI 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

Provider 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

Read read

Get the currently authenticated Odoo user profile. Returns name, email, role, and company information.

Parameters
none

Generic CLI call

kosmo integrations:call odoo.odoo_get_current_user '{}' --json

Provider 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

List contacts (customers, vendors) from Odoo with pagination. Returns contact names, emails, phone numbers, and company info.

Operation
Read read
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

Get full details of a specific Odoo contact by ID. Returns name, email, phone, address, and all associated data.

Operation
Read read
Schema command
kosmo integrations:schema odoo.odoo_get_contact --json
ParameterTypeRequiredDescription
id integer yes The Odoo contact ID.

odoo.odoo_create_contact

Create a new contact (customer or vendor) in Odoo. Supports individuals and companies.

Operation
Write write
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

List sales orders from Odoo with pagination. Filter by status, customer, or date range.

Operation
Read read
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

List invoices from Odoo with pagination. Filter by status, customer, or date range.

Operation
Read read
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

List products from Odoo with pagination. Filter by name, category, or type.

Operation
Read read
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

List CRM leads and opportunities from Odoo with pagination. Filter by stage, type, or assigned user.

Operation
Read read
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

Get the currently authenticated Odoo user profile. Returns name, email, role, and company information.

Operation
Read read
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.