# Odoo 17, 18 & 19 AI Ontology & Governed MCP Server

Canonical URL: https://naditu.com/connectors/odoo
Category: Global ERP
Read path: `PostgreSQL Read Replica · Odoo JSON-2 / XML-RPC`
Write gate: `Human-approved via Odoo ORM RPC methods`

Odoo’s PostgreSQL database looks clean until an AI agent hits ir_property / JSONB company-dependent fields, translated JSONB columns, x_studio customizations and non-stored computed fields that exist only in Python ORM methods. Direct SQL misses ORM business logic, while raw admin RPC bypasses per-user ir.rule access boundaries. Naditu combines fast replica reads with ORM-accurate semantics and caller permissions.

## Business objects & field-level governance.

- **Partner & Commercial Entity** (`res_partner · account_payment_term · res_company`) — company_id isolation & credit limit visibility by role
- **Sales Order & Invoice** (`sale_order · sale_order_line · account_move · account_move_line`) — purchase_price & margin masked outside Sales Leads & Finance
- **Stock Quant & Picking** (`stock_quant · stock_picking · stock_move · stock_location`) — Internal vs transit/scrap virtual location filtering enforced
- **Manufacturing Order & BOM** (`mrp_production · mrp_workorder · mrp_bom · mrp_bom_line`) — Workcenter cost rates restricted to Operations & Finance

## Three physical schema traps solved in the layer.

1. **Virtual stock locations (Customer, Vendor, Inventory Loss) in stock_quant:** Odoo double-entry inventory tracks customer shipments and scrap as positive balances in virtual stock_location rows (usage != internal). Summing stock_quant without usage = internal wildly corrupts on-hand stock.
2. **JSONB translated names and company-dependent properties:** In Odoo 16+, translatable fields store locale JSONB maps (en_US, tr_TR) and company-specific accounts or prices sit in JSONB property maps. Naditu resolves the right locale and company_id cleanly.
3. **Custom x_studio_ columns and non-stored ORM compute fields:** Fields calculated in Python (@api.depends without store=True) do not exist as PostgreSQL columns. The ontology documents exact SQL derivations or routes lookups through scoped RPC.

## Common engineering questions.

### Does Naditu support Odoo Community and Enterprise across versions 17, 18 and 19?

Yes, including Odoo 19’s JSON-2 API as well as Odoo 17 and 18 XML-RPC/JSON-RPC and PostgreSQL read replicas, both self-hosted and Odoo.sh.

### Why not point an off-the-shelf PostgreSQL MCP server directly at Odoo’s database?

Raw PostgreSQL MCP bypasses Odoo ir.rule multi-company security, sums virtual customer locations into warehouse stock, and risks corrupting accounting invariants if any write is attempted outside the ORM.

### How are Odoo actions such as confirming a draft purchase order executed?

Writes execute strictly through Odoo ORM methods (such as button_confirm or create) behind a named human approval gate so chatter logs, taxes and stock moves fire properly.
