Odoo Query

Odoo Query

Certified

Run Odoo XML-RPC operations

Executes Odoo model calls over XML-RPC (search_read, read, create, write, unlink, search, search_count). Requires URL, database, and user credentials; fetchType defaults to NONE so results are ignored unless explicitly fetched or stored.

yaml
type: io.kestra.plugin.odoo.Query

Search and read company partners.

yaml
id: odoo_query_partners
namespace: company.team

tasks:
  - id: query_partners
    type: io.kestra.plugin.odoo.Query
    url: http://localhost:8069
    db: demo
    username: test@demo.com
    password: "{{ secret('ODOO_PASSWORD') }}"
    model: res.partner
    operation: SEARCH_READ
    filters:
      - ["is_company", "=", true]
    fields: ["name", "email", "phone", "is_company"]
    limit: 10
    fetchType: FETCH

Create a new partner.

yaml
id: create_partner
namespace: company.team

tasks:
  - id: create_partner
    type: io.kestra.plugin.odoo.Query
    url: http://localhost:8069
    db: demo
    username: test@demo.com
    password: "{{ secret('ODOO_PASSWORD') }}"
    model: res.partner
    operation: CREATE
    values:
      name: "Acme Corporation"
      email: "contact@acme.com"
      is_company: true

Update existing partners.

yaml
id: update_partners
namespace: company.team

tasks:
  - id: update_partners
    type: io.kestra.plugin.odoo.Query
    url: http://localhost:8069
    db: demo
    username: test@demo.com
    password: "{{ secret('ODOO_PASSWORD') }}"
    model: res.partner
    operation: WRITE
    ids: [1, 2, 3]
    values:
      active: true
      category_id: [[6, 0, [1, 2]]]

Read specific partner records by ID.

yaml
id: read_partners
namespace: company.team

tasks:
  - id: read_partners
    type: io.kestra.plugin.odoo.Query
    url: http://localhost:8069
    db: demo
    username: test@demo.com
    password: "{{ secret('ODOO_PASSWORD') }}"
    model: res.partner
    operation: READ
    ids: [1, 2, 3]
    fields: ["name", "email", "phone"]
    fetchType: FETCH
Properties

Database name

Odoo database to connect to

Model name

Technical model name to target (e.g., res.partner, sale.order)

Possible Values
SEARCH_READREADCREATEWRITEUNLINKSEARCHSEARCH_COUNT

Operation

Operation to run: SEARCH_READ, READ, CREATE, WRITE, UNLINK, SEARCH, or SEARCH_COUNT

Password

Password for the provided Odoo username

Odoo server URL

Base URL of the target Odoo instance, including scheme and port

Username

Odoo login used for XML-RPC authentication

DefaultNONE
Possible Values
STOREFETCHFETCH_ONENONE

Fetch type

Controls output handling: STORE writes rows, FETCH emits all, FETCH_ONE emits first, NONE skips output (default)

SubTypestring

Fields to retrieve

Fields to return for read/search_read; null lets Odoo return all fields (may be large)

Search filters

Domain filters for search* operations; each item is [field, operator, value] and filters are ANDed. Example: [["is_company", "=", true], ["customer_rank", ">", 0]]

SubTypeinteger

Record IDs

Record IDs required for READ, WRITE, and UNLINK

Limit

Maximum rows to return for search* operations

Offset

Rows to skip before returning results for search* operations

Reference (ref) of the pluginDefaults to apply to this task.

Values

Field map required for CREATE/WRITE; keys are model fields

SubTypeinteger

List of IDs for CREATE operations or affected record IDs

Contains the IDs of created records (CREATE) or affected records (WRITE/UNLINK).

Map containing the first row of fetched data

Only populated if fetchType is FETCH_ONE.

SubTypeobject

List of map containing rows of fetched data

Only populated if fetchType is FETCH.

The number of records affected or returned by the operation

Formaturi

The URI of the result file on Kestra's internal storage (.ion file / Amazon Ion formatted text file)

Only populated if fetchType is STORE.