Odoo is one of the most flexible ERPs on the market thanks to its open-source nature and powerful API. But integrating it correctly with the rest of your tech stack requires understanding its peculiarities: Odoo’s ORM, its module system, XML-RPC and JSON-RPC protocols, and best practices for keeping integrations stable when Odoo updates.
At Soamee we have integrated Odoo in multiple projects. The most significant was Somos Musica, where we built a complete music rights and royalties management system on top of Odoo, integrating it with streaming platforms, distribution systems, and external reporting tools. This guide collects what we learned.
Why Integrate Odoo (Instead of Doing Everything Inside Odoo)
Odoo has modules for almost everything: CRM, inventory, invoicing, HR, e-commerce, marketing. But trying to do absolutely everything within Odoo has problems:
- Performance: Odoo is not designed to handle analytical dashboards with millions of records or real-time processing
- UX: Odoo’s interface is functional but not always the best experience for end users
- Specialization: Tools like Stripe for payments, Mailchimp for email marketing, or Metabase for BI do their specific job better
- Scalability: Some workloads scale better in separate microservices
The ideal strategy is to use Odoo as the core ERP (accounting, inventory, invoicing, purchasing) and integrate it with specialized tools for everything else.
Integration Methods with Odoo
XML-RPC (The Classic Method)
XML-RPC is Odoo’s most stable and documented integration method. It works across all versions and allows complete CRUD operations on any model.
import xmlrpc.client
# Configuration
url = 'https://your-odoo.com'
db = 'your-database'
username = 'admin@company.com'
password = 'your-api-key'
# Authentication
common = xmlrpc.client.ServerProxy(f'{url}/xmlrpc/2/common')
uid = common.authenticate(db, username, password, {})
# Operations
models = xmlrpc.client.ServerProxy(f'{url}/xmlrpc/2/object')
# Search invoices from last month
invoices = models.execute_kw(db, uid, password,
'account.move', 'search_read',
[[['move_type', '=', 'out_invoice'],
['invoice_date', '>=', '2026-04-01']]],
{'fields': ['name', 'partner_id', 'amount_total', 'state'],
'limit': 100})
JSON-RPC (More Modern)
JSON-RPC offers the same functionality as XML-RPC but with JSON payloads, making it easier to integrate with modern JavaScript applications.
async function odooRPC(method, model, args, kwargs = {}) {
const response = await fetch('https://your-odoo.com/jsonrpc', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
method: 'call',
params: {
service: 'object',
method: 'execute_kw',
args: [DB, UID, PASSWORD, model, method, args, kwargs]
}
})
});
return (await response.json()).result;
}
// Create a customer
const partnerId = await odooRPC('create', 'res.partner', [{
name: 'Example Company Ltd.',
email: 'contact@example.com',
vat: 'GB123456789',
is_company: true
}]);
REST API (Odoo 17+)
Since Odoo 17, a native REST API exists that significantly simplifies integration for standard operations. It is more intuitive but has less flexibility than XML-RPC for complex operations.
Webhooks and Automated Actions
For event-driven integrations, Odoo allows configuring automated actions that trigger webhooks when specific events occur (new order, validated invoice, low stock). This is ideal for keeping external systems synchronized without constant polling.
Practical Case: Odoo + Stripe + React Integration
A very common scenario is having Odoo as the management backend with a React application as the client frontend, and Stripe for payments.
Architecture
[React Frontend] → [Node.js API] → [Odoo (ERP)]
↓
[Stripe (payments)]
↓
[Webhooks] → [Odoo updates invoice]
The flow works like this:
- The customer places an order in the React app
- The Node.js API creates the order in Odoo via XML-RPC
- Stripe processes the payment
- A Stripe webhook notifies the API
- The API marks the invoice as paid in Odoo
- Odoo automatically updates inventory
Recommended Middleware
It is not recommended to call Odoo directly from the frontend. A middleware (Node.js, Python FastAPI) lets you:
- Cache Odoo responses to reduce load
- Transform data from Odoo format to what your frontend needs
- Authenticate independently from Odoo (JWT, OAuth)
- Rate limit to protect your Odoo instance
- Retry logic to handle temporary Odoo outages
E-commerce Integration
If you have an online store (Shopify, WooCommerce, PrestaShop) and use Odoo for inventory management and invoicing, bidirectional integration is key:
- Orders: Shopify to Odoo (create sale order, reserve stock)
- Inventory: Odoo to Shopify (sync available stock)
- Products: Odoo to Shopify (sync catalog, prices, descriptions)
- Customers: Bidirectional (sync contact data)
Synchronization can be real-time (webhooks) for orders and inventory, and batched (cron every 15 minutes) for catalog and prices.
Somos Musica Case: Complete Integration
With Somos Musica the integration was especially complex. The system needed to:
- Import streaming data from Spotify, Apple Music, and YouTube Music to calculate royalties
- Distribute revenue automatically between labels, artists, and composers based on complex contracts with variable splits
- Generate invoices automatically in Odoo for each settlement
- Export reporting to custom React dashboards for labels to visualize their metrics
The key was treating Odoo as the source of truth for accounting and invoicing, but building all royalty calculation logic outside Odoo in a specialized Python service. Only final results (settlements and invoices) are written to Odoo.
Common Mistakes When Integrating Odoo
1. Modifying Odoo’s Core
Never modify native Odoo modules. Any change will be lost in the next update. Always create custom modules that inherit and extend native modules.
2. Not Handling Concurrency
Odoo uses an ORM with optimistic locks. If two processes try to modify the same record simultaneously, one will fail. Your integration must handle these conflicts with retries.
3. Synchronous Integration for Everything
Don’t call Odoo synchronously for every frontend operation. Use message queues (RabbitMQ, Redis) for operations that don’t require immediate response and cache for frequent reads.
4. Ignoring Odoo Permissions
API calls respect the authenticated user’s permissions. If your integration needs to access data across multiple companies or modules, you need a technical user with appropriate permissions (but not admin, for security).
Recommended Stack for Odoo Integrations
- Middleware: Node.js with TypeScript or Python with FastAPI
- Message queue: RabbitMQ or Redis (for async operations)
- Cache: Redis (to reduce Odoo calls)
- Monitoring: Sentry for errors, Datadog for integration metrics
- Testing: Odoo API mocks for unit tests
When Odoo Is Not Enough
If your needs surpass what Odoo can offer (dashboards with millions of records, real-time processing, very complex business logic), consider a custom ERP that uses the parts of Odoo that work well and replaces those that don’t.
Odoo integration can also be the first step of an incremental migration: you start by integrating, and gradually replace Odoo modules with custom development where necessary.
Conclusion
Odoo is a powerful and flexible ERP, but its true potential is unlocked when you integrate it correctly with the rest of your stack. The key is treating it as one more component of your architecture (not the center of the universe), using middleware to protect and transform data, and designing the integration with long-term maintainability in mind.
If you need help integrating Odoo with your stack or evaluating whether Odoo is the best base for your ERP, schedule a free consultation with our team.