ERP
Odoo
A test-only Odoo model API supporting JSON-2 and a JSON-RPC execute_kw subset. Create Odoo under Systems → ERP. Nothing reaches a real Odoo database, warehouse or ledger.
Testlie is independent of Odoo. The name identifies compatibility, not endorsement or certification.
Connect
For JSON-2, replace your Odoo host with the system's base URL and POST JSON to <base>/json/2/{model}/{method}. Send Authorization: Bearer <apiKey> and, optionally, X-Odoo-Database: <database> using the credentials shown in the system. A mismatched database is rejected. GET /web/version returns the simulated 19.0 version.
For legacy JSON-RPC, use <base>/jsonrpc with { "jsonrpc": "2.0", "id": "your-id", "method": "call", "params": { ... } }. The subset supports common.version, common.authenticate/login with the test database, login and API key, and object.execute_kw. Successful authentication returns user ID 2. Password sessions, XML-RPC and arbitrary model/method dispatch are unsupported.
Models and methods
| Model | Main fields |
|---|---|
res.partner |
name (required), email, phone, address fields, is_company |
product.product |
name (required), default_code, list_price, standard_price |
sale.order |
Existing numeric partner_id, optional name/reference/note |
sale.order.line |
Existing order_id and product_id, product_uom_qty, price_unit, discount |
Supported methods: create, read, search, search_read, search_count, fields_get, write and unlink. Read-only fields include id, display_name, timestamps and computed order totals/state. Many-to-one values are returned as [id, displayName].
{ "vals_list": [{ "name": "Sample Company", "is_company": true }] }POST this to /json/2/res.partner/create. JSON-2 create returns an ID array; this subset accepts one record per call. Read using { "ids": [123], "fields": ["id", "name"] }; update using { "ids": [123], "vals": { "city": "Dubai" } }. Mutating methods accept one ID per call. JSON-RPC uses standard positional args: create receives [values] and returns a single integer, read/unlink receive [[ids]], write receives [[ids], values], and search methods receive [domain] plus supported keyword args.
Sales workflows
Create a partner, product, draft order and separate order line. Line prices default from the test product; order amount_total is quantity × price × (1 − discount/100), rounded to two decimals. There are no taxes, fiscal positions or accounting computations.
Call sale.order/action_confirm with { "ids": [orderId] } to move a draft with lines to sale. action_cancel moves draft/confirmed orders to cancel; action_draft returns a cancelled order to draft. Confirmed orders and their lines cannot be edited. The workflow does not create inventory moves, invoices, procurement or notifications. Referenced records cannot be deleted.
Searches, scenarios and limits
Search methods support flat AND domains with at most twelve [field, operator, value] conditions. Operators: =, !=, numeric ranges, in, not in, like and ilike. Like/ilike perform literal substring matching with optional outer %; internal patterns, _, OR/NOT domains and nested relational traversals are unsupported. fields, offset (0–1000), limit (1–500) and one order field are supported. Unsupported arguments are rejected.
The shared rate-limit, server-error and delay scenarios apply. Decline rejects test record mutations. No native webhook/event delivery, installed-module behavior, ACL/record-rule simulation, arbitrary Python execution or interactive Require action is implemented. The shared workspace permissions and per-mock credentials still protect access.
At most 500 records per model, one mutation per call, 100 IDs per read and 128 KB per request. Shared storage scans the newest 1,000 records across models; use small fixtures. Retention and object limits apply. Use test data only.
Contract references: Odoo JSON-2 and its controller, including recordset ID-array results. Database-specific custom models are outside this subset.