About the Odoo category

Add topics about this connector package here.
Always check the ‘How to use the Alumio connector packages’ topic.

Extra information

System documentation: Odoo External API Documentation

Connector Package Documentation

Table of Contents

  • 1. Setting up HTTP Client
    • 1.1 Steps
  • 2. Subscribing to Entities from Odoo through XML-RPC
    • 2.1 Steps
    • 2.2 General Concept
  • 3. Publishing Entity to Odoo through XML-RPC
    • 3.1 Steps
    • 3.2 General Concept

1. Setting up HTTP Client

1.1 Steps

  1. In Alumio Dashboard, go to Clients > HTTPS Client. Create a new HTTP Client and select Odoo XML-RPC HTTP Client as the prototype of the HTTP Client.
  2. Fill in the Base URI, Database, Username, and Password.

2. Subscribing to Entities from Odoo through XML-RPC

2.1 Steps

  1. Go to Connections → Incoming and create a new incoming configuration and select Odoo XML-RPC Subscriber as the subscriber.
  2. Fill in the Request URI field with /xmlrpc/2/common or /xmlrpc/2/object.
  3. Fill in the Model Name field with the model you want to fetch.
  4. Fill in the Method Name field with the method name you want to call.
  5. Add any request parameters needed to subscribe to the entity (optional).
  6. You can optionally add a transformer to transform the request parameters into something you need.
  7. Select the Odoo XML-RPC HTTP Client to use.

2.2 General Concept

We follow Odoo XML-RPC documentation on building this connector so you can easily use the connector based on the Odoo External API Documentation.

Request URI

It’s the URI you want the RPC call to be made to Odoo. There are only two URIs, they are /xmlrpc/2/common or /xmlrpc/2/object.

Model Name
The name of the model you want to subscribe to from Odoo.

Method Name
The name of the method you want to execute in Odoo through the XML-RPC.

Request Parameters

These are the parameters you can provide to get the needed entity based on the Odoo External API Documentation. Please look at the example below on how to fill the Request Parameters field when subscribing Single Request entity

Input Transformer

Any transformers set here will be executed after the Request Parameters are loaded. So, you basically can add any transformer to provide and transform the request parameters into anything you need, either as path parameters and/or as query parameters of an entity.

HTTP Client

It’s the HTTP Client configuration or prototype you will use to access Odoo through XML-RPC.

3. Publishing Entity to Odoo through XML-RPC

3.1 Steps

  1. Go to Connections → Outgoing, create a new outgoing configuration, and select Odoo XML-RPC Publisher as the publisher.
  2. Select the action that you want the publisher to do with the data.
  3. Select the Odoo XML-RPC entity you want the data to be published.
  4. Select the HTTP Client to use.

3.2 General Concept

Like the subscriber, the publisher has similar methods on how to use it. The difference is the payload that will be submitted by the publisher originating from the data (from routes, from transformers in outgoing configuration).

Request URI

It’s the URI you want the RPC call to be made to Odoo. There are only two URIs. They are /xmlrpc/2/common or /xmlrpc/2/object.

Model Name
The name of the model you want to subscribe to from Odoo.

Method Name
The name of the method you want to execute in Odoo through the XML-RPC.

You can put the payload you want to send to Odoo into the payload property in the data. Here is an example of the Possible Response after Creation.

image

HTTP Client

It’s the HTTP Client configuration or prototype you will use to access Odoo through XML-RPC.

NOTES

In the Odoo XML-RPC Subscriber, you can see the input field with the help text “Starts with the 5th Array”, it’s from the Odoo External API documentation, see below.

You don’t need to input the Database, User ID, model name, and method name into the Request Parameter. Instead, put it in where we already provide it.

As for the model name, and method name, you can input them in the UI of the Odoo XML-RPC Subscriber. See below.

While for the Database, user ID, and user password, you only need to input it in the Odoo XML-RPC Client. See below.

The request parameter usually looks like this.

And this works the same in the Publisher as well.