# Integrating with Odoo

### Prerequisites

To connect **Odoo to Drivetrain**, you need:

* An **active Odoo account** with admin permissions

#### Step 1: Create a Dedicated User for Drivetrain in Odoo

* Log in to **Odoo** as an **Admin**
* Go to **Settings → Users → Manage Users**

<figure><img src="/files/SToBBsuoqZX2hZQrejf0" alt=""><figcaption></figcaption></figure>

* Click **New**
* Fill in the required user details
  * **Email**: Use the email ID shared by your Drivetrain implementation team
* Go to the **Access Rights tab**
  * Assign appropriate access based on the data Drivetrain needs
* Click **Save**
* An **invitation email** is sent automatically
  * The user must accept the invite and set a password to activate the account

{% hint style="info" %}
Use **Internal User (required for API access)**
{% endhint %}

{% hint style="info" %}
**User Type** can be chosen on the **Manage Users page** by clicking on the search bar, and then setting a filter for either **Internal User** or **Portal User.**
{% endhint %}

#### Step 2: Generate Consumer Key and Consumer Secret (OAuth)

* Ensure your Odoo instance is configured for a **single database** (database filter enabled)
* Log in as an **Admin**
* Go to **Settings → Users → Users**
* Open the **Drivetrain user** created in [Step 1](#step-1-create-a-dedicated-user-for-drivetrain-in-odoo)
* Click **OAuth Applications**
* Click **Register an Application**
  * Use the following **Redirect URI:** <https://fivetran.com/integrations/odoo/oauth2/return>
* Click **Save**
* Copy the generated:
  * **Consumer Key**
  * **Consumer Secret**

#### Step 3: Share Details with Drivetrain

Share the following with your Drivetrain team via a **secure document:**

* **Odoo subdomain** (from your login URL)
* **Consumer Key**
* **Consumer Secret**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://integrations.drivetrain.ai/integration-guide/integrate-with-drivetrain/accounting-and-erp/integrating-with-odoo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
