| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 1033 |
| Technical Name |
no_smart_undo |
| License | OPL-1 |
| Website | https://www.oudayet.com |
| Versions | 16.0 17.0 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 1033 |
| Technical Name |
no_smart_undo |
| License | OPL-1 |
| Website | https://www.oudayet.com |
| Versions | 16.0 17.0 18.0 19.0 |
Smart Undo — Recycle Bin
Recycle Bin, Field Change History and Archive Undo — one module, three safety nets.
Odoo 19 $40 USD 25 Tests Passing
Three Mistakes That Cost Hours
Accidental deletes, overwritten edits, archived-by-mistake. Standard Odoo gives you no way back.
Without this module
A user hits Delete on the wrong rows — the data is gone. Someone overwrites a phone number — no history. A record gets archived by mistake — no trail, no easy revert.
With this module
Deletes go to a Recycle Bin with a 10-second Undo toast. Every field change is tracked with one-click revert. Archive and unarchive are reversible from the same change log.
One Module. Three Safety Nets.
Replaces three to five separate modules with a single installation.
Soft-delete via archive. Browse, restore, or permanently delete from a dedicated view. Daily auto-purge after a configurable retention.
Field-level write tracking. Old value, new value, who and when. One-click revert per field, or batch revert per write.
Every archive and unarchive is logged in the same Change History. Revert to put the record back exactly where it was.
A 10-second toast with an Undo button appears the moment records are deleted — from list view, form view, or any server action.
Per-model toggle. Excluded core models. No workflow changes.
Real-World Scenarios
Twelve rows selected by mistake, Delete pressed, dialog confirmed. The toast pops up. One click, all twelve are back — or visit the Recycle Bin tomorrow morning and restore them by batch ID.
An import script touched 400 product records and wrote the wrong list price on each. Open Change History, filter by user and date, batch-revert. Original prices restored without a database restore.
A junior accountant ran an archive action on inactive partners and caught five active customers in the net. Change History shows the archive event, batch revert, customers reactivated — and the original archive date is preserved.
Who archived the supplier? Who changed the bank account? The Change History view shows the user, the field, the old and new values, and the timestamp. No external audit module needed.
How It Works
A patch on the base model wraps unlink, write, action_archive and action_unarchive for every protected model.
Deletes become archives plus a Recycle Bin entry. Writes capture old & new values. Archive and unarchive get a Change History entry with the prior state.
From the toast, the Recycle Bin, or the Change History view. Single record, batch by ID, or filter-driven bulk restore. A daily cron purges old entries.
Installation
No Python dependencies, no migration, no manual configuration.
Step 1
Install from the Apps menuApps menu → remove the Apps filter → search “Smart Undo” → Install.
Step 2
Tune from SettingsSettings → Smart Undo. Toggle the master switch, pick which models are protected, set retention windows for the Recycle Bin and Change History.
Works With Every Model You Care About
Anything with an active field is eligible — core or custom.
Core system models (ir.*, bus.*, mail.*) are excluded by default for stability.
What This Module Doesn't Do
Honest scope. Here's what's out of reach.
Computed non-stored fields, related fields, and one2many / many2many lines aren't recorded. The Change History tracks what's actually written to the database.
DDL changes from module updates (added or removed fields, schema changes) aren't reversible — they're not user actions. Only ORM-level user operations are tracked.
Recycle Bin works by archiving. Models without an active field can't be soft-deleted — deletes pass through normally. Change History still tracks their writes.
Tracking writes generates rows. The defaults (30 days for trash, 90 days for Change History) keep the table size predictable; tighten or relax per your appetite.
No External Services. No Hidden State.
Smart Undo runs entirely inside your Odoo instance. Two new tables (undo.trash, undo.change.log), two cron jobs, one settings page, two record-rule sets (User and Manager). Every byte stays in your database.
FAQ
Tracking adds one INSERT per write per changed field, scoped to the models you protect. The list of excluded fields filters out churny system fields (write_date, state, kanban_state) so you're not logging UI clicks.
Yes — the Manager group has a Permanently Delete action that runs a true unlink and bypasses the soft-delete entirely. The User group can only restore.
No. Mail-related fields (message_ids, activity_ids) are in the SKIP list. Smart Undo doesn't post messages or schedule activities — it stays out of the chatter.
Yes. with_context(force_delete=True).unlink() bypasses the Recycle Bin. with_context(no_smart_undo_skip_tracking=True).write({...}) bypasses the Change History. Used internally for revert operations.
Two groups ship: Smart Undo User (sees own activity, restores own records) and Smart Undo Manager (sees everything, can permanently delete and purge). Record rules enforce the boundary.
At a Glance
© Naim OUDAYET — oudayet.com — OPL-1 license
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module