This module allows you to create substitution rules for report actions. A typical use case is to replace a standard report by alternative reports when some conditions are met. For instance, it allows to configure alternate reports for different companies.
auto_awesome What this module does
AI-generated from the code · Odoo 19.0Lets administrators define rules that automatically replace one report with another when the selected records match a condition, for example to use a different report per company.
This module adds a "Substitution Rules" tab to the configuration form of every report action in Odoo. There, an administrator can list rules that say: when this report is requested for records matching a given condition, print another report instead.
Each rule stores the original report, the replacement report, a sequence number for priority, and a condition written as a filter on the records. The replacement report must work on the same model as the original one.
- Rules are evaluated in sequence order; the first matching rule wins.
- The condition is checked against the records being printed, so substitution can depend on the data itself (for example the company).
- A safety check refuses to save a rule that would create an endless substitution loop.
- Substitution also applies when a report is attached to an email template, so the correct report version is sent.
- Regular users can only read the rules; only system administrators can create, change or delete them.
The module touches ir.actions.report and adds the new model ir.actions.report.substitution.rule. It also adjusts mail.thread so that report templates used in messages respect the substitution rules. The behaviour works both from the backend interface and when reports are generated in code.
Depends on
Models and fields (3)
- mail.thread · extends an existing model
- ir.actions.report · extends an existing modelaction_report_substitution_rule_ids (Substitution Rules)
- ir.actions.report.substitution.rule · new modelmodel, domain, sequence, action_report_id (Report Action), substitution_action_report_id (Substitution Report Action)
Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 6 confirmed, 3 with no information of 9 versions.
Sources · Odoo 17.0
Confirmed on 2026-11-03 in branch 17.0 of OCA/reporting-engine.
terminal Installation and usage
OCA documentation · Odoo 19.0Usage
Source · Odoo 19.0To use this module, you need to:
- Go to 'Actions' / 'Reports'
- Select the desired report you want to 'Substitution Rules'
- In the substitutions page add a new line
- Select the substitution report action
- Set a domain to specify when this substitution should happen
When a user calls a report action, the system tries to find the first substitution in with a domain that matches all records.
No verified information in OCA: Installation, Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.