Odoo icon

Odoo

Consume Odoo API

Actions20

Overview

This node interacts with the Odoo API to perform operations on a custom resource within Odoo. Specifically, the 'Get All' operation retrieves multiple records from a specified custom resource. It supports filtering the results based on multiple conditions, selecting specific fields to include in the response, and controlling the number of results returned either by returning all or limiting to a specified number. This node is useful for scenarios where users need to fetch bulk data from custom Odoo models, such as retrieving all customer orders, product listings, or any other custom data entities defined in Odoo.

Use Case Examples

  1. Fetch all records from a custom Odoo model without any filters to get a complete dataset.
  2. Retrieve a limited number of records (e.g., 50) from a custom resource to display in a dashboard or report.
  3. Apply multiple filters to fetch only records that meet specific criteria, such as orders from a certain date range or customers from a particular region.
  4. Select only certain fields to reduce data size and focus on relevant information, like fetching only names and IDs of records.

Properties

Name Meaning
Custom Resource The specific custom Odoo model to operate on, selected from available models loaded dynamically.
Return All Determines whether to return all matching results or limit the number of results returned.
Limit Maximum number of results to return when 'Return All' is false. Must be between 1 and 1000.
Options Additional options for the request, including selecting specific fields to include in the response.
Filters Conditions to filter the records returned by the query. Multiple filters can be added, each specifying a field, an operator, and a value to compare.

Output

JSON

  • id - Unique identifier of the record in the custom resource.
  • fieldName - Fields of the custom resource as specified in the 'Fields To Include' option, containing the corresponding data values.

Dependencies

  • Odoo API credentials including URL, username, password, and database name

Troubleshooting

  • Ensure that the Odoo API credentials are correctly configured and valid; authentication failures will prevent data retrieval.
  • If no records are returned, verify that the filters are correctly specified and that the custom resource contains data matching those filters.
  • When using the 'Limit' option, ensure the value is within the allowed range (1 to 1000) to avoid errors.
  • Network connectivity issues or incorrect API endpoint URLs can cause request failures; verify the Odoo instance URL is correct and accessible.

Links

Discussion