Record Rule Preview
Write a record rule and see how many records it actually leaves a chosen user, counted for real before you save it
The video below shows Record Rule Preview running on a real Odoo 19 database. Want it driven against your own data, or a question answered first? Ask and we will set up a session.
Record rules fail quietly. A domain that is wrong by one operator raises nothing - the affected users simply stop seeing records, and nobody reports that as a bug, because an empty list looks like an empty list. You find out weeks later, from a salesperson who assumed their pipeline had gone cold.
So write the rule here first, and get the number before anybody else does.
The rule was created, the records that user could reach were counted, and the rule was rolled back.
What it does
The number is measured, not predicted
The rule is created for real inside a database savepoint, the records are counted through the ORM as that user, and the whole thing is rolled back. Reproducing what Odoo would have done is exactly the guess this removes.
It already includes the other rules
Global record rules are ANDed together, so a rule that is correct alone can still take everything away once another global rule exists on the model. The count was taken with all of them in force, so the intersection is in the number rather than in your head.
A stale preview cannot be applied
Edit the domain, the groups, the permissions or the sample user after previewing, and Apply is blocked until it is measured again. A count that describes a rule which no longer exists is worse than no count at all.
It refuses the usual mistakes
A rule leaving the sample user zero records has to be acknowledged in writing. The superuser cannot be the sample user - it bypasses every record rule and would report them all harmless. A domain that does not parse, or is not a list, is refused at the form rather than at 2am.
It creates an ordinary record rule
Applying writes a normal ir.rule. Nothing is wrapped or intercepted, and Odoo enforces it exactly as it enforces any other. Uninstall the app and the rules you made stay where they are.
Screenshots

Requirements
- Odoo 19.0, Community or Enterprise.
- Odoo.sh or On-Premise only. Third-party apps cannot be installed on Odoo Online (SaaS) databases — check your hosting before buying.
- Odoo 19 Community or Enterprise, no other module needed. It restricts records, not fields - which columns a user may read is Field Access Rules .
- Module
mh_record_rule_preview, version 19.0.1.0.12, licensed OPL-1.
Related apps
Move Odoo attachments out of the filestore into a Google Drive folder, using Odoo 19 own cloud storage migration - Drive is the provider Odoo does not ship
Hide or lock any field for the groups you choose, on any model, enforced by the server and not just hidden in the form view
Log users out after an idle time you set per group, and see and end the sessions that are open right now