Every Odoo professional knows the anxiety: "What if this test action hits production?" One wrong click, and you send an email to real customers, synchronize real banking data, or validate a payment that should have remained fictitious.
This is precisely why Odoo includes an elegant and often overlooked mechanism: the neutralized database. Understanding how it works means gaining peace of mind and professionalism on every project.
What is a Neutralized Database?
A neutralized database is simply a protected copy of your production database. As soon as Odoo detects that a database is not intended for real operations — backup restoration, duplication, staging environment — it automatically switches to a safe mode.
The most visible sign: a red banner appears at the top of the interface. This banner is your signal that nothing critical can reach production. In short: you work with real data, but without real consequences.
When Does a Database Become Neutralized?
Odoo triggers neutralization automatically in four very common situations:
What Gets Deactivated
To protect your business, Odoo disables seven categories of critical features:
What This Changes in Your Projects
Seeing the red banner means having the freedom to work without fear. Neutralization is not a constraint — it is a professional safety net that allows you to act with confidence.
Odoo's neutralized database is not just a technical feature — it is a professional safety mechanism. Whenever you see that red banner, know that you are in a safe space to test, learn and experiment.
Understanding this system means working on Odoo with the confidence of experts. Because in a production ERP, trust is not improvised — it is built with the right tools.
Defining Your Own neutralize.sql File
Odoo allows you to extend neutralization to your own modules by creating a neutralize.sql file. It is executed automatically during each database neutralization, after Odoo's native file.
__manifest__.py is required. Odoo automatically detects the file if placed in data/neutralize.sql at the root of your module.File Location in the Module
Practical Example
Here is the most common case: a module integrating an external API with a secret key and a production endpoint. On a neutralized database, these values must never remain active.
Three fields, three lines. The key and secret are replaced with an inert value, and the endpoint switches to the provider's sandbox. No production data can leak to an external service.
UPDATE and SET statements. Avoid any DELETE or ALTER TABLE — it is designed to neutralize values, not to modify the database structure.
Like any file in your module, neutralize.sql should live in your Git repository. Update it every time you add an external integration or a table containing sensitive data.
On Odoo.sh, it is executed automatically each time a staging branch is created from production — a reliable and reproducible safety net on every deployment.