Quick Answer
In Odoo, there is no global "Undo" button. Rolling back requires surgical precision: backup before uninstalling modules, delete Studio fields via Technical menu, deactivate broken views to fix white screens, or restore from database backup as last resort. Wrong rollbacks can corrupt your entire database.
Introduction: The "Undo" Button Doesn't Exist
One of the most terrifying moments in Odoo administration is realizing a customization has gone wrong. Maybe a new module broke the checkout process, or a Studio field is causing an "Internal Server Error."
⚠️ Reality Check: In Odoo, there is no global "Undo" button. You cannot simply press Ctrl+Z to revert a database change.
Rolling back requires a surgical approach. If you do it wrong (e.g., deleting a column in PostgreSQL directly), you can corrupt your entire database. This guide provides the safe, technical workflows to revert changes in Odoo 17, 18, and 19.
Scenario 1: Uninstalling a Custom Module (Safely)
The most common rollback.
⚠️ The Risk: Uninstalling a module deletes all data associated with it. If your custom module added a "Commission" column to Sales Orders, uninstalling it wipes that commission data forever.
The Workflow:
| Step | Action |
|---|---|
| 1. Backup | Always download a backup (with filestore) before clicking uninstall |
| 2. Check Dependencies | Go to Apps → Module Info → Technical Data → Look at "Dependent Modules" |
| 3. Uninstall | Click the "Uninstall" button in the Apps menu |
💡 Dependency Warning: If you uninstall custom_sales, it might also uninstall custom_accounting if they are linked. Always check the dependency tree first.
Terminal Method (If UI is Broken)
If the module crashed the interface, use the command line:
./odoo-bin -c /etc/odoo.conf -d db_name -u all --stop-after-init
📝 Note: This updates modules. To fully uninstall, you often need to manually remove the folder from addons and update the app list, or use specific XML-RPC scripts.
Scenario 2: Removing Odoo Studio Fields
When "No-Code" creates a mess.
Studio is great, but it leaves "ghost" fields behind.
The Workflow:
| Step | Action |
|---|---|
| 1. Find the Field | Go to Settings → Technical → Database Structure → Fields |
| 2. Filter | Search for fields starting with x_studio_ |
| 3. Identify | Find the specific field (e.g., x_studio_commission) |
| 4. Delete | Deleting it here removes the column from the database |
| 5. Clean Views | Delete the Studio view in Settings → Technical → User Interface → Views |
⚠️ Warning: Deleting a field removes the data in it for all records. There is no recycle bin.
🔍 Finding Studio Views: Odoo Studio creates XML views like "Odoo Studio: Sale Order Customization". You must find these in the Views menu and delete the specific xpath node, or the view will crash.
Scenario 3: Reverting View Changes (The "White Screen" Fix)
You edited XML and now Odoo won't load.
⚠️ The Risk: A bad XPath expression in a custom view can prevent Odoo from rendering the page (White Screen of Death).
The Fix:
| Step | Action |
|---|---|
| 1. Debug Mode | Activate Developer Mode (with assets): Add ?debug=assets to your URL |
| 2. Go to Views | Settings → Technical → User Interface → Views |
| 3. Search | Filter by "Inherited View" to find your customization |
| 4. Toggle Active | Uncheck the "Active" box on your broken view |
| 5. Reload | Refresh the page. Odoo will load the standard view again |
https://your-odoo.com/web?debug=assets
Scenario 4: The "Nuclear Option" (Database Restore)
When the data is corrupted.
If a customization ran a script that bulk-deleted records or calculated accounting entries wrongly, you cannot "fix" it. You must restore.
The Workflow:
| Step | Action |
|---|---|
| 1. Identify Timestamp | When did the bad script run? (e.g., 2:00 PM) |
| 2. Find Backup | Locate the backup from before the issue (e.g., 1:00 PM) |
| 3. Restore to Staging | Restore to a new database name (e.g., production_restored) |
| 4. Verify | Check if the data is correct in the restored version |
| 5. Swap | Rename production → production_broken, then production_restored → production |
# Stop Odoo first
sudo systemctl stop odoo
# Rename databases
psql -U postgres -c "ALTER DATABASE production RENAME TO production_broken;"
psql -U postgres -c "ALTER DATABASE production_restored RENAME TO production;"
# Restart Odoo
sudo systemctl start odoo
⚠️ Critical: Never overwrite your live DB immediately. Always restore to a new name first and verify the data.
Rollback Quick Reference
| Scenario | Risk Level | Data Loss? |
|---|---|---|
| Uninstall Module | Medium | Yes - Module data deleted |
| Delete Studio Field | Medium | Yes - Field data deleted |
| Deactivate View | Low | No - Reversible |
| Database Restore | High | Depends - Data since backup lost |
Frequently Asked Questions
Can I undo an "Automated Action"?
Yes. Automated actions (Server Actions) only run when triggered. If you disable the action in Settings → Technical → Automation, it stops immediately. To revert the data changes it made (e.g., it mass-updated 1,000 records), you must write a "Reverse Script" in Python or manually correct the data.
Does Odoo.sh have backups?
Yes. Odoo.sh creates automated daily backups and allows "Point-in-Time" recovery (PITR) for the last 7-30 days depending on your plan. You can roll back the production branch with one click in the Odoo.sh dashboard.
How do I delete a "Custom App" from the Apps menu?
Uninstalling the app removes it from the "Installed" list, but it remains in the "Apps" list. To remove it completely, you must delete the module folder from your server's addons directory and click "Update App List" in Odoo.
What happens if I delete a field that's referenced in a report?
The report will crash with a "Field does not exist" error. Before deleting any field, search for it in Settings → Technical → Reports and Settings → Technical → User Interface → Views to ensure it's not referenced anywhere.
Can I recover a deleted record in Odoo?
No built-in recycle bin. Once a record is deleted, it's gone unless you have database-level backups or use a third-party "Soft Delete" module that archives records instead of permanently deleting them.
Conclusion: Rollback is a Skill
The ability to safely revert changes is what separates a Junior Admin from a Senior Architect. By understanding dependencies, XML views, and database structures, you can undo almost any mistake without resorting to panic.
Need a Safety Net?
Braincuber provides Emergency Rollback Support. If your database is down, we can restore it.
Emergency Odoo Support
Database down? Customization broke your system? We provide rapid response rollback services to get your Odoo back online.
Rapid response • Database recovery • We bring your data back
