Skip to Content
← Back to catalog
Delete Guard

Delete Guard

Open source

Block deletion model by model, reserve it for a few groups, and keep a record of every deletion.

Technical nameoski_delete_guard
LicenseLGPL-3
AuthorOdooSkills
⬇ Download (20.0)

Delete Guard

Block deletion model by model, reserve it for a few groups, and keep a record of every deletion.

A deletion leaves nothing behind: the record disappears, and its chatter with it. Odoo only offers one global right per model, granted or denied once and for all in the access rights — with no possible exception, no explanatory message, and not the slightest record of what was deleted.

What it adds

  • 🛡️ Lock model by model — choose the models to protect: orders, contacts, journal entries, whatever you decide.
  • 🔑 Grant the exception to whoever you want — the designated groups keep the right to delete. No designated group means: nobody.
  • 💬 Explain the refusal — the message shown is yours ("Archive instead of deleting"), not a technical error.
  • 📓 Log without blocking — the "Allow, but log" mode leaves the door open and keeps a record: model, ID, display name, author, date.
  • 🔧 Maintenance is never blocked — installations, upgrades, uninstallations and scheduled actions pass through the guard: it protects the interface, not the server.

Real screenshots

1. Two models, two regimes

Contacts remain deletable, but every deletion is logged; contact tags, on the other hand, are locked for everyone.

List of deletion rules: Contact in "Allow, but log" mode, Partner Tags in "Forbid, except for allowed groups" mode

2. The refusal, as the user reads it

An administrator tries to delete a tag: the deletion is stopped and the message is the one written in the rule. The guard makes no exception for the administrator.

Odoo error dialog showing the custom message "Une étiquette de contact ne se supprime pas : archivez-la." (a contact tag cannot be deleted: archive it) after a deletion attempt

3. What actually disappeared

Three deleted contacts, with their ID and their name at the time of deletion — the only two pieces of information that can no longer be recovered afterward.

Deletion log: three contacts deleted by Claire Morel, with date, ID and record name

Why adopt it

  • The name and ID are captured before the deletion: afterward, nothing can rebuild them.
  • No global setting to change: the guard sits on top of your existing access rights, without redefining them.
  • Open source module, LGPL-3 license — no subscription, no external dependency.

Going further

To go beyond deletion and restrict what each person sees, the OdooSkills range includes some fifteen access-restriction modules — by sales team, by department, by project, by accounting journal, by warehouse. Full catalog: apps.odooskills.com.

License LGPL-3 — compatible with Odoo 19.0 Community and Enterprise. Support: apps@odooskills.com.

Discussion