Query
Query Odoo ERP system via XML-RPC API.
This task interacts with Odoo models using XML-RPC API. It supports various operations like search_read, create, write, unlink, search, and search_count. You can configure the Odoo server connection and specify the model, operation, and parameters.
type: "io.kestra.plugin.odoo.Query"Examples
Search and read company partners.
id: odoo_query_partners
namespace: company.team
tasks:
- id: query_partners
type: io.kestra.plugin.odoo.Query
url: http://localhost:8069
db: demo
username: [email protected]
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.
id: create_partner
namespace: company.team
tasks:
- id: create_partner
type: io.kestra.plugin.odoo.Query
url: http://localhost:8069
db: demo
username: [email protected]
password: "{{ secret('ODOO_PASSWORD') }}"
model: res.partner
operation: CREATE
values:
name: "Acme Corporation"
email: "[email protected]"
is_company: true
Update existing partners.
id: update_partners
namespace: company.team
tasks:
- id: update_partners
type: io.kestra.plugin.odoo.Query
url: http://localhost:8069
db: demo
username: [email protected]
password: "{{ secret('ODOO_PASSWORD') }}"
model: res.partner
operation: WRITE
ids: [1, 2, 3]
values:
active: true
category_id: [[6, 0, [1, 2]]]
Properties
db *Requiredstring
Database name
The name of the Odoo database to connect to
model *Requiredstring
Model name
The Odoo model to operate on (e.g., 'res.partner', 'sale.order', 'product.product')
operation *Requiredstring
SEARCH_READREADCREATEWRITEUNLINKSEARCHSEARCH_COUNTOperation
The operation to perform on the model
password *Requiredstring
Password
Odoo password for authentication
url *Requiredstring
Odoo server URL
The base URL of your Odoo instance (e.g., https://my-odoo-instance.com)
username *Requiredstring
Username
Odoo username for authentication
fetchType string
NONESTOREFETCHFETCH_ONENONEFetch type
How to handle query results. STORE: store all rows to a file, FETCH: output all rows as output variable, FETCH_ONE: output the first row, NONE: do nothing (default for non-read operations)
fields array
Fields to retrieve
List of field names to retrieve in search_read operations. If not specified, all fields are returned.
filters array
Search filters
Domain filters for search operations. Each filter is a list of field, operator, value. Multiple filters are combined with AND logic. Example: [["is_company", "=", true], "customer_rank", ">", 0]
ids array
Record IDs
List of record IDs for write/unlink operations
limit integerstring
Limit
Maximum number of records to return (for search operations)
offset integerstring
Offset
Number of records to skip (for search operations)
values object
Values
Field values for create/write operations. Map of field names to values.
Outputs
ids array
List of IDs for CREATE operations or affected record IDs
Contains the IDs of created records (CREATE) or affected records (WRITE/UNLINK).
row object
Map containing the first row of fetched data
Only populated if fetchType is FETCH_ONE.
rows array
List of map containing rows of fetched data
Only populated if fetchType is FETCH.
size integer
The number of records affected or returned by the operation
uri string
uriThe URI of the result file on Kestra's internal storage (.ion file / Amazon Ion formatted text file)
Only populated if fetchType is STORE.