ml-connector
OdooAirbase

Odoo and Airbase integration

Odoo runs your accounting and procurement. Airbase runs your spend management and approvals. Connecting the two closes the gap between purchase orders in Odoo and spend approvals in Airbase, and posts approved spend back into Odoo's general ledger without manual re-entry. New vendors and purchase order changes in Odoo flow into Airbase, and when spend is approved in Airbase, the accounting entries post into Odoo automatically. ml-connector handles the API differences and keeps both systems in sync on your schedule.

How Odoo works

Odoo exposes vendors, purchase orders, GL accounts, employees, and accounting transactions through XML-RPC and JSON-2 REST APIs, with separate endpoints for authentication and data operations. Access requires an API key paired with a username login on the customer's Odoo instance (Online at https://<subdomain>.odoo.com, PaaS at https://<subdomain>.odoo.sh, or self-hosted). Webhooks via Automated Actions exist but are not production-grade; polling with write_date filters on high-water-mark timestamps is the recommended approach.

How Airbase works

Airbase exposes vendors, purchase orders, bills, payments, GL accounts, and subsidiaries through a tenant-specific REST API at https://<company>.airbase.io, authenticated with a static Bearer token generated in the portal. Webhooks are available for events like purchase_request_approved, with a standard JSON payload structure. GL accounts and subsidiaries are read-only, as the connected ERP is the source of truth. API documentation is customer-gated at https://developer.airbase.io.

What moves between them

Vendors and purchase orders flow from Odoo into Airbase on a daily or weekly schedule, keyed to your procurement cycle. When a purchase order is approved or updated in Odoo, ml-connector fetches it with the write_date filter and upserts it in Airbase as a new purchase order record. When spend is approved in Airbase and a purchase_request_approved webhook fires, ml-connector reads the associated bill or expense and posts the accounting entry into Odoo's general ledger, mapped to the GL account and analytic account specified in the purchase order.

How ml-connector handles it

ml-connector polls Odoo on your schedule using the write_date filter to detect new and changed purchase orders and vendors since the last run, avoiding re-processing unchanged records. It translates Odoo's vendor and purchase order models into Airbase's REST format and stores the Airbase Bearer token encrypted. When an Airbase webhook arrives with purchase_request_approved, ml-connector validates the signature (if documented in the portal) and reads the associated spend record, then posts the GL entry into Odoo's account.move table, mapped to the correct GL account and cost center from the original purchase order. Odoo's API key authentication is refreshed on each call, and Airbase rate limits are handled with exponential backoff and retry.

A real-world example

A mid-market B2B software company runs Odoo for accounting and procurement, and Airbase for spend management and corporate card control. Before the integration, procurement created purchase orders in Odoo, but approvals and spend in Airbase never flowed back to GL. Month-end close required manual reconciliation of approved spend in Airbase against the Odoo general ledger. With Odoo and Airbase connected, new purchase orders in Odoo sync to Airbase for approval workflow, and when spend is approved, the GL entry posts to Odoo automatically. The finance team closes the month with all GL entries aligned to Airbase approvals and no manual posting step.

What you can do

  • Sync vendors and purchase orders from Odoo to Airbase on a schedule tied to your procurement cycle, with automatic deduplication.
  • Post approved spend from Airbase back into Odoo's general ledger, mapped to the correct GL account and cost center.
  • Handle Odoo's polling-based API with write_date filters to detect only new and changed records.
  • Bridge Odoo's API key authentication and Airbase's Bearer token with encrypted credential storage.
  • Maintain a complete audit trail on every vendor, purchase order, and GL posting, with replay on failure.

Questions

Does ml-connector write back to Odoo or only read purchase orders?
ml-connector reads purchase orders and vendors from Odoo and writes approved spend back into Odoo's general ledger as accounting entries (account.move records). It uses Airbase's purchase_request_approved webhook to trigger the posting, ensuring Odoo GL always reflects approved spend.
How does ml-connector handle the difference between Odoo's XML-RPC and JSON-2 APIs?
ml-connector supports both transport methods and defaults to JSON-2 for Odoo 19+ instances. It validates the Odoo instance URL and handles both Odoo Online, Odoo.sh, and self-hosted deployments by accepting the full base URL per customer.
What happens if an Airbase webhook arrives but the matching purchase order is not in Odoo?
ml-connector logs the mismatch and surfaces it in the audit trail. The webhook is not discarded; it can be replayed once the purchase order is synced from Odoo, or manual intervention can create the GL entry. This prevents silent loss of approved spend.

Related integrations

Connect Odoo and Airbase

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started