ODOOFX · Odoo Test Automation for Robot Framework
ODOOFX (the robotframework-odoofx package) is an open-source Robot Framework library for Odoo test automation: Odoo's web client and API under one vocabulary, completed by an HTTP channel and report PDFs. Version 0.3.0 is on PyPI: 121 documented keywords, 251 tests run live on Odoo 16 and 19, all green. This page says what exists, what remains to be done and in which order.
An ERP that changes every year, tests that must keep up
Odoo ships one major version a year, every company extends it with modules and customisations, and its APIs evolve. A generic testing tool sees web pages; ODOOFX aims to see models, fields and workflow states.
One major version a year
Menus, labels and views change from one version to the next. ODOOFX aims for a single codebase with version detection, rather than one test suite per version maintained in parallel.
Modules and customisations specific to each company
Sales, inventory, accounting, community modules and in-house developments: ODOOFX reads the actual instance (models, fields, views) rather than a generic description of Odoo.
APIs that change shape
Odoo 19 deprecates /xmlrpc and /jsonrpc in favour of the JSON-2 API, with removal announced for version 22. The ODOOFX RPC channel already supports both paths: XML-RPC up to Odoo 18, JSON-2 from Odoo 19.
Two channels to act and verify
Odoo's web client and API, under one vocabulary: a test acts through the channel closest to the user's journey and checks through the most direct one, as SAPFX does on SAP. Four capabilities complete them: the database structure, the session context, an HTTP channel and report PDFs.
Web client
Odoo's web client driven by the Browser library (Playwright): login with target proof, navigation by external ids, reading of views, complete form entry (dates, selections by code, relations, lines, sections and notes, numbers in the user's format), wizards and dialogs, search through the search bar, archiving and deletion through the Actions menu. Working since 0.2.0, extended in 0.3.0: screen writes closed by default and journaled, and a half-filled form is never saved by accident.
RPC API
Create, read, update, search and delete records, call a business method (confirm, cancel) without going through the screen: XML-RPC up to Odoo 18, JSON-2 from Odoo 19, with channel=auto picking by version. Working since 0.1.0: writes closed by default and journaled, target proven before any action.
Database structure
Read through the API a model's fields with their type and relations, the models whose name contains a text, a module's state, the codes of a selection field and the id behind an external identifier. This is what makes it possible to write a spec grounded in the instance rather than in assumptions.
Session context
A language, a time zone or a list of companies sent with every RPC call, since Odoo applies none of the user's preferences to an RPC call. An inactive language, an unknown time zone or a company the user does not have is refused at once.
HTTP channel
RequestsLibrary's session and request keywords, absorbed under their names and arguments (a migration guide gives each deliberate change), an authenticated Odoo web session on the proven target, and a write over Odoo's RPC routes guarded, journaled and sent only once.
Report PDFs
The PDFs Odoo prints (quotation, invoice, delivery slip), read through the report route on a web session: text normalised and asserted, an amount written as Odoo writes it in the document's language, the partner's. A print that would make Odoo save an attachment is refused before sending, unless explicitly allowed. pdf extra (pypdf).
Not covered yet: kanban, calendar, pivot and graph views, the chatter, a list's mass actions and Odoo's legacy /jsonrpc route. The Odoo mobile app (Appium) stays outside the scope of the first version.
What 0.3.0 automates today
Three uses covered by the published version, on screen as well as through the API, proven on Odoo 16 and 19.
Regression tests, on screen and through the API
Replay a business flow on screen (a quotation entered in full with its sections and notes, a down payment invoiced through the wizard, a search through the search bar, an archiving through the Actions menu) or over XML-RPC and JSON-2, check state codes whatever the UI language, then the text of the PDF the document prints. A suite chooses by technical code, never by label, which changes from one version to the next.
Clean, traceable test data
Every record created carries a run marker; every write, through the API, on screen or over HTTP, is journaled (planned, done, failed, unknown), and a write with an unknown outcome is read back, never sent again. Writes stay closed until the connection allows them, and a print that would save an attachment is refused before sending.
Access rights, target proof and secrets
Check that a user belongs, or not, to a group named by its external identifier, and prove the version, the database and the identity of the instance before any action: two Odoo versions can run side by side with no risk of confusion. A secret travels by its name, never by its value: not in a step, not in a file.
Valid test data that never leaves the workstation
Three concrete needs of ERP testing, entered in the backlog and framed: reading report PDFs is delivered in 0.3.0, the other two remain to be done.
Quotations, invoices and delivery slips read as PDF
The PDF is read through Odoo's report route on an authenticated web session, then its text is normalised and checked; an amount is compared as Odoo writes it in the document's language. A PDF without a text layer fails and says so, never through an empty read.
Business identifiers valid by construction
Fictitious but valid French company numbers (SIREN, SIRET), EU VAT numbers and IBANs, provided by a Robot Framework package shared with SAPFX. A logged seed replays a failure with the same data.
A local test mailbox
Odoo's outgoing SMTP server points to a Mailpit mailbox in a local container, read through its API: bounded wait for a message, content, links. Never a public mailbox.
From foundation to version 1.0, in this order
What is delivered, then what comes next, in the repository's order; no deadline is announced.
Project foundation · in place
Public repository, Apache 2.0 license, continuous integration, writing guard, project memory. Two Odoo test instances (16 and 19) are provisioned with their demo data.
Library RPC channel · delivered in 0.1.0
Reads, writes closed by default and journaled, business method calls, target proof; XML-RPC up to Odoo 18, JSON-2 from Odoo 19. The first thirty documented keywords.
First live campaign · done
The sales quotation, from observed plan to executed suite: 15 RPC suites and 65 tests on Odoo 16 and 19 (creation, confirmation, sending, cancellation and rollback, rights, stored product).
Distribution · 0.1.0, 0.2.0 and 0.3.0 on PyPI
The robotframework-odoofx package on PyPI: 0.1.0, 0.2.0, 0.3.0; the keyword documentation online and the public repository in sync.
Web channel and database structure · delivered in 0.2.0
Through the Browser library: login with proof of the database and series, navigation by menu external ids, reading of views, form entry and saving, action buttons; through the API, fields, relations, models and module states. Second campaign: eight web and ORM suites, 52 tests run live on Odoo 16 and 19.
Extended web channel, HTTP and report PDFs · delivered in 0.3.0
Complete entry of a quotation on screen (sections and notes, wizards and dialogs, numbers in the user's format), search through the search bar, archiving and deletion through the Actions menu; RequestsLibrary's keywords absorbed, an authenticated Odoo web session and guarded HTTP writes; report PDFs; a session context for RPC calls. 121 documented keywords, 251 tests run live on Odoo 16 and 19, all green.
Prove Odoo 20 · next step
Measure the library on Odoo 20 before saying anything about it: no result is published before the measurement.
Multi-version and continuous integration · to come
Version detection exists; what remains is adapting to each version, mapping menus and labels, measuring on Odoo 14, 15, 17, 18 and Enterprise (today Odoo 16 and 19 Community only) and a continuous integration matrix across the targeted versions.
The lab in one command · to come
Odoo test instances described in the repository and installed in one command, with their demo data.
Test e-mails, in a local mailbox · to come
Odoo's outgoing SMTP server pointed to a test mailbox in a local container, read through its API: an expected message, its content, its links, never a public mailbox.
Kanban, calendar, pivot and graph views, chatter, mass actions · to come
The other views of the web client, a form's chatter and a list's mass actions, each with its live proof on Odoo 16 and 19 before any publication.
Version 1.0 · after these steps
Stabilised signatures, supported features documented version by version, targeted versions measured.
Install from PyPI, in one command
The robotframework-odoofx package installs from PyPI (Python 3.10 or later, Robot Framework 7.4 or later) and the documentation of its 121 keywords is online. Credentials go through the command line, never into a suite.
# Install the library from PyPI
pip install robotframework-odoofx
# Optional: the Browser library, for the web channel
pip install "robotframework-odoofx[web]"
rfbrowser init # Playwright browsers, once
# Optional: the text of report PDFs (pypdf)
pip install "robotframework-odoofx[pdf]"
*** Settings ***
Library OdooFxLibrary
*** Test Cases ***
Read A Quotation State
Connect To Odoo http://localhost:8069 my_database admin ${PASSWORD} channel=xmlrpc
Assert Quotation Status Is sale S00004
[Teardown] Disconnect From Odoo
# Run it: the secret goes through the command line
# robot -v "PASSWORD: Secret:<secret>" read_quotation.robot
Understanding ODOOFX
Short answers on the project's status, the targeted versions, the channels and where ODOOFX stands next to SAPFX and rf-test-agents.
Where does ODOOFX stand today?
ODOOFX is in its alpha phase, version 0.3.0, published on PyPI (after 0.2.0 and 0.1.0). Two channels under one vocabulary work and are proven live on Odoo 16 and Odoo 19: the web client, through the Browser library, and the API, through XML-RPC up to Odoo 18 and through JSON-2 from Odoo 19, writes closed by default and journaled. An HTTP channel, report PDFs and a session context complete them. 121 keywords are documented; 38 suites and 251 tests were played on the two instances, all green (119 on Odoo 16, 132 on Odoo 19). Not covered yet: kanban, calendar, pivot and graph views, the chatter, a list's mass actions, the legacy /jsonrpc route. No result on a customer instance is claimed.
- Open code from day one: the public repository reflects the actual state, no showcase.
- Measured figures, not anticipated ones: every published result states its scope and limits.
Which Odoo versions does ODOOFX target?
Odoo Community and Enterprise, from version 14 onwards, with a single codebase and version detection rather than one branch per version. The two versions proven so far are Odoo 16, the last legacy web client, and Odoo 19, in the Community edition; Odoo 14, 15, 17, 18 and Enterprise are not measured yet, and Odoo 20 is the next step. Odoo 19 deprecates the /xmlrpc and /jsonrpc endpoints in favour of the JSON-2 API, with removal announced for version 22: the library speaks XML-RPC up to Odoo 18 and JSON-2, with an API key, from Odoo 19. Measured between the two versions: the same selection code under another label, a contact's mobile field removed in Odoo 19, printing a posted invoice saving its PDF as an attachment on Odoo 16 while no report action does so on Odoo 19, a report route answering 400 on Odoo 16 and 500 on Odoo 19 for a missing record. Hence the rule: a suite chooses by technical code, never by label.
- Two reference generations: Odoo 16 and Odoo 19 in local containers.
- API anticipated: JSON-2 in service before the legacy endpoints are removed.
Why test Odoo through the API and the ORM as well as the UI?
The UI proves the user's journey, but it is slow and sensitive to display changes. RPC calls prepare data and check the actual state of records without going through the screen; ORM introspection gives the real models, fields and workflow states instead of assumptions. The same test can act through the UI and check through the API, then read the PDF Odoo prints through its report route rather than through a browser download.
- Act on screen, verify through the API: a check that does not depend on the display.
- Specs grounded in the instance: the ORM is read, not guessed.
How does ODOOFX relate to SAPFX and rf-test-agents?
rf-test-agents defines the common method: Spec-Test-Driven Development. SAPFX applies it to SAP, ODOOFX to Odoo, without forking it: a method improvement found on Odoo goes back to rf-test-agents and then down to the other verticals. ODOOFX brings what is specific to Odoo: ORM perception, RPC channels, reading views and workflow states.
- One method, several ERPs: the same STDD method applies to SAP and to Odoo.
- No code dependency: each vertical keeps its own lifecycle.
Measured results and validation scope
Test Odoo with Robot Framework through the web client and the API, with an HTTP channel and report PDFs. Published sources and measurement conditions are listed below.
- 251 live tests on Odoo 16 and 19 38 suites replayed on two development Docker instances, on the code of version 0.3.0, each by its own command line: 119 tests on Odoo 16 (20 suites), 132 on Odoo 19 (18 suites), 251 green out of 251. By channel: the API 155 tests, the database structure 16, the web client 80. No customer instance. Internal replay
- 0.3.0 published on PyPI Published after 0.2.0 and 0.1.0: pip install robotframework-odoofx, Python 3.10 or later, Robot Framework 7.4 or later; web (Browser library), pdf (pypdf) and ntlm (requests_ntlm) extras. Installed from PyPI in a fresh environment with the pdf extra, it exposes its 121 keywords. Alpha phase: signatures may still change before 1.0. robotframework-odoofx package on PyPI
- 121 documented keywords Web client, RPC API (XML-RPC up to Odoo 18, JSON-2 from Odoo 19), database structure, session context, HTTP channel (RequestsLibrary's session and request keywords, absorbed under their names and arguments) and report PDFs, all documented by Libdoc; only one, Create New Quotation, is a skeleton that just warns. Not covered yet: kanban, calendar, pivot and graph views, the chatter, a list's mass actions, the legacy /jsonrpc route. Keyword documentation (Libdoc)
- 120 examples replayed in Robot Framework Each of the 120 keywords that are not a skeleton carries a usage example, replayed as written in Robot Framework against Odoo 16 (120 of 120). A ledger of fingerprints forbids an example from changing without being replayed. Internal measurement, no customer instance. Internal replay