Odoo v2

Provides integration with Odoo, a business management (ERP) suite whose apps cover sales, invoicing, accounting, inventory, CRM, purchasing and more. Every app stores its data as records of a model, for example contacts in res.partner.

The Node queries, creates, updates and deletes records of any persistent model in the connected Odoo database. Templates are built from the database itself, so they list the models and fields of the apps you have installed. It works with Odoo Online, Odoo.sh, custom domains and on-premises servers.

Revision History

0.0.0.1 - Initial release.

Connection

Property Type Description
ApiType Enum Json2, the default, uses an API key and requires Odoo 19 or later. JsonRpc uses a username and password, for servers before Odoo 19.
BaseUrl String The Odoo server root, for example https://mycompany.odoo.com. Use an https address with no path. Plain http is accepted only for localhost.
Database String The Odoo database name. Required for JsonRpc. Optional for Json2; set it when the server hosts several databases.
ApiKey Masked The Odoo API key of the user the Workflow acts as. Required for Json2.
Username String The Odoo login, usually an email address. Required for JsonRpc.
Password Masked The Odoo password, or an API key in place of the password. Required for JsonRpc.
TimeoutSeconds Integer Timeout for each request to Odoo, from 1 to 3600 seconds. The default is 100.

Setup Notes

  1. Choose the ApiType that matches your Odoo version: Json2 for Odoo 19 and later, or JsonRpc for earlier versions.
  2. For Json2, create an API key for the Odoo user the Workflow should act as and enter it in ApiKey. For JsonRpc, enter the user's login in Username and the password or an API key in Password.
  3. Enter the server root in BaseUrl and, when needed, the database name in Database.
  4. Test the Connection. For Json2, a server older than Odoo 19 fails with Json2 requires Odoo 19 or later; select JsonRpc.

Keep the following in mind when you set up the Connection:

  • The Node can only read and change the records the Odoo user is allowed to access.
  • On Odoo Online, the external API needs Odoo's Custom plan. A JsonRpc user on Odoo Online needs a local password.
  • An expired or revoked API key fails with Odoo authentication failed. Check the connection's ApiKey. Replace the key in the Connection to continue.
  • Odoo is removing the JSON-RPC API in Odoo 22 and Odoo Online 21.1. Use Json2 on Odoo 19 and later.

This Node runs on the Cloud Cluster and on local Clusters. Use a local Cluster when your Odoo server is not reachable from the internet. When the local Cluster Host runs on the same machine as Odoo, BaseUrl can use plain http, for example http://localhost:8069.

Methods

The Node exposes four Methods: Query, Create, Update and Delete. Each Method lists one template per model in the connected database, named <Method> <Model Name> (<model>), for example Query Contact (res.partner). Select a template so Flowgear fills in the OperationId, Options and, for mutations, the Items fields of that model. Fields of types such as reference, properties and json are left out and named in the template description.

Query

Reads records of the selected model. Use it to export contacts, products, orders or any other Odoo records into other systems.

Parameter Type Description
Connection Connection The Odoo Connection.
OperationId String The template key that identifies the Odoo model.
Options Object Optional Domain, Fields, Order, Lang and CompanyIds values.
Return Type Description
Response Array One row per Odoo record, without a Flowgear object. No matching records return zero rows.

Options accepts these text values:

  • Domain: an Odoo domain as JSON text, for example [["active","=",true]]. Leave it empty to read every record.
  • Fields: a comma-separated list of field names, for example id,name,email. Leave it empty to read the fields shown in the template's Response.
  • Order: the sort order, for example name asc.
  • Lang: a language code for translated values, for example en_US.
  • CompanyIds: a comma-separated list of company IDs the user may act in, for example 1,2.

When Lang and CompanyIds are not set, the Odoo user's own defaults apply.

In the returned rows:

  • Empty fields are null.
  • A many2one field returns the related record's ID, plus a <field>_display_name column with its display name, for example country_id and country_id_display_name.
  • one2many and many2many fields return the related record IDs as comma-separated text, for example 1,2.
  • Stored binary fields, such as image_* fields, are not read unless you name them in Fields.

Create

Creates one record of the selected model for each item.

Parameter Type Description
Connection Connection The Odoo Connection.
OperationId String The template key that identifies the Odoo model.
Items Array The records to create, one per item. Required.
Options Object Optional Lang and CompanyIds values.
Return Type Description
Response Array One row per item with the new record's id and the Flowgear object with IsSuccess, Message and Request. id is null when the item failed.

Fields that Odoo requires are listed first in the template and marked Required. in their description.

Update

Updates one existing record of the selected model for each item.

Parameter Type Description
Connection Connection The Odoo Connection.
OperationId String The template key that identifies the Odoo model.
Items Array The records to update, one per item. Each item's id selects the record, and its other fields are the values to write. Required.
Options Object Optional Id fallback record ID, plus Lang and CompanyIds values.
Return Type Description
Response Array One row per item with the targeted record's id and the Flowgear object with IsSuccess, Message and Request.

Fields you leave out of an item keep their current values in Odoo.

Delete

Deletes one record of the selected model for each item.

Parameter Type Description
Connection Connection The Odoo Connection.
OperationId String The template key that identifies the Odoo model.
Items Array The records to delete, one per item. Each item's id selects the record. Required.
Options Object Optional Id fallback record ID.
Return Type Description
Response Array One row per item with the targeted record's id and the Flowgear object with IsSuccess, Message and Request.

Usage Notes

  • For Update and Delete, each item's id selects its record, so one Step can change or delete many records. Items without an id use Options.Id.
  • Write many2one fields as the related record's ID, for example "country_id": 3. Write one2many and many2many fields as comma-separated record IDs: "3,7" replaces the related records with records 3 and 7, and "" removes them all.
  • Templates show date values as 2026-01-31, datetime values as 2026-01-31 13:45:00, and binary values as base64 text.
  • If you change ApiType from JsonRpc to Json2, keep Database filled in so saved Steps keep working.
  • If a Step fails with The selected template key is stale or unknown. Refresh the template list., reselect the template.
  • Query errors fail the Step. A failed Create, Update or Delete item returns Flowgear.IsSuccess set to false with Odoo's message, and later items still run. A timeout or an authentication failure fails the Step, and earlier items are already saved.
  • Create, Update and Delete requests are not retried. A write that times out may still have been applied in Odoo, so check the records before you run the Step again.

Known Issues

  • Only reading, creating, updating and deleting records are supported. Other model methods, such as action_confirm and message_post, as well as aggregates, attachments and upsert, are not supported.
  • A saved Step only works with a Connection that points at the same Odoo server and database. If you switch a Workflow to a Connection for another server or database, reselect the template on each Odoo Step.
  • An on-premises Odoo server that only serves plain http across a network cannot be reached. Put TLS in front of it, or run the Workflow on a local Cluster Host on the same machine and use a localhost address.

See also