# Odoo

> Connect Odoo 16 or later with a database, user and API key; pull partners and customer invoices, push issued Alya Books invoices.

Source: /help/en/integrations/odoo

The Odoo connector talks to your Odoo instance through its JSON-RPC interface. It pulls partners and posted customer invoices into Alya Books and can push invoices that Alya Books has issued into Odoo as posted customer invoices. Only owners and admins can connect and sync.

## Connect

1. In Odoo, open your user's **Preferences → Account security** and create an **API key**.
2. In Alya Books go to **Connectors**, click **Connect Odoo** and enter the Odoo URL (for example `https://mycompany.odoo.com`), the database name, your login and the API key. The key is stored for the connection only and never shown again; when you edit the connector later, leave **API key** blank to keep it, or enter a new one to replace it.
3. Set the sync options: pull partners, pull customer invoices, push issued Alya Books invoices, the income account id and the tax id for 5 % VAT used on pushed lines.
4. Save, then click **Test**. Alya Books signs in, stores the user id and marks the connector *connected*.

Set **Mode** to *Sandbox (simulated)* to try the flow without an Odoo instance.

## Sync

**Sync** offers *changes since the last sync*, *everything* or *invoices in a date range*.

- Partners are matched by TRN, then by name, and updated on later runs.
- Customer invoices arrive as **drafts** with Odoo's number, partner, lines and taxes. Review, validate and submit as usual. Invoices already in Alya Books are skipped.
- Pushed invoices are created and posted once; the result lists the Odoo id or the error per invoice.

Connectors set to *daily* are synced by the daily job as well.

## Related

- [QuickBooks Online](/help/en/integrations/quickbooks-online)
- [Xero](/help/en/integrations/xero)
- [Accounting exports](/help/en/integrations/accounting-exports)
