
Odoo Query
CertifiedRun Odoo XML-RPC operations
Odoo Query
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.
type: io.kestra.plugin.odoo.QueryExamples
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: 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.
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.
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.
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
db *Requiredstring
Database name
Odoo database to connect to
model *Requiredstring
Model name
Technical model name to target (e.g., res.partner, sale.order)
operation *Requiredstring
SEARCH_READREADCREATEWRITEUNLINKSEARCHSEARCH_COUNTOperation
Operation to run: SEARCH_READ, READ, CREATE, WRITE, UNLINK, SEARCH, or SEARCH_COUNT
password *Requiredstring
Password
Password for the provided Odoo username
url *Requiredstring
Odoo server URL
Base URL of the target Odoo instance, including scheme and port
username *Requiredstring
Username
Odoo login used for XML-RPC authentication
fetchType string
NONESTOREFETCHFETCH_ONENONEFetch type
Controls output handling: STORE writes rows, FETCH emits all, FETCH_ONE emits first, NONE skips output (default)
fields array
Fields to retrieve
Fields to return for read/search_read; null lets Odoo return all fields (may be large)
filters array
Search filters
Domain filters for search* operations; each item is [field, operator, value] and filters are ANDed. Example: [["is_company", "=", true], ["customer_rank", ">", 0]]
ids array
Record IDs
Record IDs required for READ, WRITE, and UNLINK
limit integerstring
Limit
Maximum rows to return for search* operations
offset integerstring
Offset
Rows to skip before returning results for search* operations
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
values object
Values
Field map required for CREATE/WRITE; keys are model fields
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.