Odoo Vertical · v0.3.0 on PyPI · Apache 2.0

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.

251 Tests run live Odoo 16 and 19 · 38 suites, all green
121 Documented keywords Version 0.3.0 · on PyPI
120 Replayed examples Robot Framework · Odoo 16
2 Odoo versions proven Odoo 16 and 19 Community
The challenge

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.

Upgrades

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.

Version detection Menu mapping Normalised labels
Business modules

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.

Community Enterprise Custom modules
Changing APIs

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.

XML-RPC JSON-2 (Odoo 19) Picked by version
Architecture

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.

Channel 1

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.

Browser / Playwright Forms and wizards Search bar
Channel 2

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.

XML-RPC JSON-2 CRUD
Structure

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.

Models Fields Modules
New in 0.3.0

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.

Language Time zone Companies
New in 0.3.0

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.

RequestsLibrary Odoo session Guarded writes
New in 0.3.0

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).

Quotations and invoices Normalised text Localised amounts

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.

Use cases

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

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.

State codes XML-RPC / JSON-2 Odoo 16 and 19 Entry on screen Report PDFs
Test data

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.

Run marker Write journal Rollback
Rights, target and secrets

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.

Groups Expected version Secrets by name
Data and evidence

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.

Delivered in 0.3.0

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.

Odoo reports Normalised text Localised amounts
Planned

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.

SIREN / SIRET VAT Replayable seed
Planned

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.

Mailpit Local SMTP Never public
Roadmap

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.

1

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.

2

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.

3

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).

4

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.

5

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.

6

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.

7

Prove Odoo 20 · next step

Measure the library on Odoo 20 before saying anything about it: no result is published before the measurement.

8

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.

9

The lab in one command · to come

Odoo test instances described in the repository and installed in one command, with their demo data.

10

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.

11

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.

12

Version 1.0 · after these steps

Stabilised signatures, supported features documented version by version, targeted versions measured.

Getting started

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
Architecture questions

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.

ADR 01 · Current status v0.3.0 · PyPI

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.
ADR 02 · Versions & APIs One codebase

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.
ADR 03 · Channels Web + RPC + ORM

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.
ADR 04 · Ecosystem Common method

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.
Evidence & scope

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.