Installation
What Restrict Delete & Export requires, how to install it, and how to check the install worked.
Requirements
| Odoo | 18.0 (Community or Enterprise) |
| Python | 3.10 or later |
| Module dependencies | base, web — both in every Odoo install |
| External Python packages | none |
On-premise
- Copy the module into your addons path.
cp -r security_access_restriction /opt/odoo/custom-addons/- Restart Odoo.
sudo systemctl restart odoo- Update the apps list. Enable developer mode (Settings → General Settings → Developer Tools), then Apps → Update Apps List.
- Install. Search for Restrict Delete & Export and click Install.
- Configure. Go to Settings → Access Restrictions.
Odoo.sh
Add the module to your repository, push, and install it from Apps once the build is green.
From the release ZIP
unzip security_access_restriction_18.0.1.0.0.zip -d /opt/odoo/custom-addons/
sudo systemctl restart odooThe ZIP contains a single top-level directory, security_access_restriction/, which is what Odoo expects on the addons path.
Verifying
After installing:
- Settings → Access Restrictions exists, with Restriction Rules and Blocked Attempts under it.
- Settings → Access Restrictions shows the settings panel.
- Settings → Technical → Scheduled Actions contains Access Restrictions: Purge Blocked Attempts.
- On a user's Access Rights tab, an Access Restrictions role selector appears.
Nothing is restricted yet. Installing the module changes no behaviour until you create a rule — deliberately, so an install never surprises anyone the next morning.
Granting access
The installing administrator gets the Manager role automatically, as does every user in the Settings group at install time. Everyone else needs it assigned:
Settings → Users & Companies → Users → open a user → Access Rights → Access Restrictions → choose Viewer or Manager.
Your first rule
See USER_GUIDE.md. The short version:
- Restriction Rules → New
- Model: Contact, tick Delete
- Allowed groups: the group that should keep the right
- Write a message that says what to do instead
- Save
Upgrading
Replace the module directory, restart, then Apps → Restrict Delete & Export → Upgrade.
Your rules and settings are preserved: the shipped parameters are noupdate data, so an upgrade never resets a choice you made.
Uninstalling
Apps → Restrict Delete & Export → Uninstall.
All restrictions stop immediately and the rules are removed with the module's tables. That is the intended behaviour — uninstalling must never leave a database in which operations are still blocked but the rules are gone.
Export the blocked-attempt log first if you want to keep it; every view supports Odoo's standard export.
Troubleshooting
Something is blocked that should not be. Check Blocked Attempts — the refusal is recorded with the rule that caused it. Then check whether the user's group is on that rule's allowed list.
Nothing is being blocked. Check the rule is active, the master switch is on (Settings → Access Restrictions), and the user is not in the Settings group (who bypass by default) — see USER_GUIDE.md.
You have locked yourself out. The superuser always bypasses; this cannot be switched off. From an Odoo shell:
env['ir.config_parameter'].sudo().set_param('access_restriction.enabled', '0')
env.registry.clear_cache()
env.cr.commit()That disables every restriction until you turn it back on.