Tameson Odoo icon

Tameson Odoo

Consume Odoo API

Overview

The Tameson Odoo node for n8n allows you to interact with custom resources in an Odoo instance. Specifically, the Update operation enables you to update fields of a record in any custom Odoo model by specifying its ID and the fields to change. This is useful when you need to automate updates to custom business objects or modules within your Odoo environment.

Common scenarios:

  • Automatically updating custom records (e.g., project statuses, custom CRM entities) based on workflow triggers.
  • Integrating external systems with Odoo by synchronizing data into custom models.
  • Bulk updating specific fields across multiple custom resource records.

Example:
If you have a custom Odoo model for "Subscriptions" and want to update the status or renewal date of a subscription record whenever a payment is received, this node can automate that process.


Properties

Name Type Meaning
Custom Resource Name or ID options Select the Odoo model (custom resource) to update. You can choose from a list or specify the model name using an expression.
Custom Resource ID string (text) The unique identifier of the record in the selected custom resource/model that you want to update.
Update Fields fixedCollection A collection of field/value pairs to update. Each entry lets you select a field (by name or ID) and provide the new value for that field.

Details for "Update Fields":

  • Field Name or ID: Choose the field to update (from a list or via expression).
  • New Value: The new value to set for the chosen field.

Output

  • The output is a JSON object representing the updated record as returned by the Odoo API.
  • The structure of the output will match the fields of the custom resource/model, including the updated values.
  • If multiple items are processed, the output will be an array of such objects.
  • In case of error (and if "Continue On Fail" is enabled), the output may include an error property with the error message.

Example output:

[
  {
    "id": 123,
    "field1": "newValue",
    "field2": 42,
    ...
  }
]

Dependencies

  • Odoo Instance: Requires access to an Odoo server with the relevant custom models.
  • API Credentials: Needs valid Odoo API credentials (URL, username, password, database name).
  • n8n Configuration: The node must be configured with the "odooApi" credential type in n8n.

Troubleshooting

Common issues:

  • Invalid Credentials: If the Odoo API credentials are incorrect, authentication will fail. Error message: "Credentials are not valid" or "Settings are not valid: ..."
    • Resolution: Double-check the URL, username, password, and database name.
  • Model or Field Not Found: If the specified custom resource or field does not exist, the update will fail.
    • Resolution: Ensure the model name and field names/IDs are correct and available in your Odoo instance.
  • Insufficient Permissions: The user may lack permissions to update the record.
    • Resolution: Verify the user's access rights in Odoo.
  • Invalid Field Values: Providing a value of the wrong type or format for a field may cause errors.
    • Resolution: Check the expected data types for each field in your Odoo model.

Links and References


Discussion