Update Records
odoo.write
ActionCRM & salesconnection required
Calls the Odoo API with the connection's credentials.
Write the same field values to every named record. Odoo answers with a single true for the whole batch, so this is all-or-nothing, not per record.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Odoo
- Secret shape
- the API key, or {"api_key": "…"} — Odoo takes it in place of the password
- Config it needs
- base_url, db, username, uid
- Resolved by
- config.connection_id, else node.connection_id
Configuration
4 fields, 2 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
model Technical name of the Odoo model to act on, such as 'res.partner' or 'sale.order'. | string | Yes | — | — | res.partner |
ids Record ids to act on, as a JSON array of whole numbers. | array | No | — | array of number | [1,2] |
id A single record id — the convenient form when only one record is affected. | number | No | — | ≥ 1 | — |
values Field values to write, as a JSON object keyed by field name. | object | Yes | — | ≥ 1 characters | {"name":"Acme Ltd"} |
- At least one of ids, id must be set.
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"ids": [
1,
2
],
"model": "res.partner",
"values": {
"name": "Acme Ltd"
}
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
written True when Odoo confirmed the write. | boolean | — |
result Exactly what Odoo returned, unflattened. | any | — |
ids The record ids the write was applied to. | array | — |
count How many records the call returned or affected. | number | — |
model The model the call was made against. | string | — |
{
"count": 0,
"ids": [],
"model": "",
"result": null,
"written": false
}Notes
- A many2one field comes back as a [id, display name] pair and is written as a bare id; one2many and many2many fields are written with Odoo's command triplets, e.g. [[6, 0, [1, 2]]] to replace the whole set.
See Update Records run in a workflow.
In a technical demo we add the Odoo connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.