Most Odoo installations are a permission mess. Groups stay open because removing one feels dangerous — overnight a clerk can no longer pick an analytic account, a journal, or a product on a customer form. Fear beats hygiene, so almost everyone drifts toward “almost Settings”.
AI intensifies that problem. Users rarely see how oversized their access already is; an assistant that acts with those same privileges turns leftover ACL into an automated attack surface. Without least privilege, a chat assistant inherits oversized access and can read where the user never consciously looked — payroll, journals, or another team's documents — simply because the groups were left open “just in case”. At the same time, AI is part of the solution — if it does not “fix chaos by hand”, but works inside a supervised least-privilege frame: closed roles, a human Confirm on every sensitive change, and a deterministic align path instead of free-form group surgery.
In the AI era, ACL cannot stay “leave it open just in case”. It has to become supervised management of minimum privilege — with AI accelerating diagnosis and proposals, not amplifying disorder.
Inspired by the OCA idea, not a fork of it. Same goal — package
res.groups into roles — with a playbook that fits
messy live databases and an AI-era ERP:
base_user_role.acl.align / acl.bulk_align) with human
Confirm; never free-form group surgery. OCA roles have no AI posture.Under Apache-2.0, no hard dependency on OCA. Uninstalling this module leaves native Odoo groups on users as they were — it is a facilitator, not a parallel permission system.
Agentic access-control manager for the Patanegra Soft Suite
(seed agent pns_acl_manager). It packages native Odoo
res.groups into functional roles, adds
selection grants (pick records without master UI), ships a
safe migrate-then-align playbook for live databases, keeps
ACL checkpoints so you can undo a bad align or migrate, and
can Suggest names for Seal proposals from the same screen
(no Chatboo skills). See Compared to OCA user roles above for how
that differs from a hard sync-on-install model.
Production airbag: before every align and every
migrate, the module stores a versioned restore point
(acl.checkpoint, schema v2) with the full role catalog (incl.
Seal origin/candidates), assignment lines, selection grants, model guards
and native group sets for the users in scope. Restore archives roles that
did not exist in the snapshot. You can also create one manually from
ACL Manager → Checkpoints.
Menus hide screens, not data. Native Odoo lets Purchase / Sales users
read every journal item even when Accounting menus are hidden —
so an AI chat (or an export) can dump the whole ledger. A
model guard (acl.guard) closes the model
at the ORM level for everyone except the roles you pick.
sudo() business code stay untouched;
Settings administrators always keep access.pns_acl_manager) to rename automatic proposals; no Chatboo skillorigin=migrate); never overwrites Manual/Seed packages. Refresh migrate snapshots rewrites only migrate-owned roles. Grant stays OFF. An automatic checkpoint is taken first.acl.align / acl.bulk_align trusted
action (never imitated with raw Safe Plan CRUD steps). An automatic checkpoint
is taken before each align (one shared blob for bulk).
ACL Manager is Settings-only (base.group_system). Settings
(system) users and portal/share users are never rewritten by grant or align.
Auto-checkpoints keep the last 30 non-manual entries; manual checkpoints are kept.
Per role + model: auto-managed selector res.groups, read-only
ir.model.access, optional ir.rule from domain override.
Selector-only users: master menus hidden, forms blocked, field whitelist on read.
Full app ACL on the model still wins over selector-only limits.
Capture and migrate stay in the ACL Manager UI only. Chatboo may
help with ad-hoc additive proposes (create a role, add a group, assign a user via
propose_safe_operations + Confirm) and it can now also propose
align / least-privilege enforce — but ONLY as a trusted action
(op="action", action_code: "acl.align" /
"acl.bulk_align"), a closed, pre-vetted call into the EXACT same
_acl_align_plan() / _acl_align_apply() the UI wizard and
bulk action use. It must never imitate an align with raw
create/write/unlink steps, rewrite native
groups directly, mass-delete assignment lines, or resurrect retired skills. The
trusted action still requires Settings access and human Confirm on the
toast — the wizard/button on the user form remains available as an alternative.
| Model | Purpose |
|---|---|
acl.role | Permission package (groups + grant flag) |
acl.role.line | User assignment with optional date window |
acl.grant | Selection without master UI |
acl.guard | Deny sensitive model at ORM (except chosen roles) |
acl.discovery.wizard | Scan / migrate helpers |
acl.user.align.wizard | Deterministic single-user align preview + apply |
acl.checkpoint | Versioned ACL restore point (roles, lines, grants, user groups) |
Apache License 2.0 — © 2026 PATANEGRA Soft