sickn33/antigravity-awesome-skills/odoo-security-rules
Claude Code and agent skill by sickn33/antigravity-awesome-skills
- community
Checking that the SKILL.md file is still in the repository.
Expert in Odoo access control: ir.model.access.csv, record rules (ir.rule), groups, and multi-company security patterns.
Install
npx vskill@latest install sickn33/antigravity-awesome-skills/odoo-security-rulesSKILL.md
Odoo Security Rules
Overview
Security in Odoo is managed at two levels: model-level access (who can read/write which models) and record-level rules (which records a user can see). This skill helps you write correct ir.model.access.csv entries and ir.rule domain-based record rules.
When to Use This Skill
- Setting up access rights for a new custom module.
- Restricting records so users only see their own data or their company's data.
- Debugging "Access Denied" or "You are not allowed to access" errors.
- Implementing multi-company record visibility rules.
How It Works
- Activate: Mention
@odoo-security-rulesand describe the access scenario. - Generate: Get correct CSV access lines and XML record rules.
- Debug: Paste an access error and get a diagnosis with the fix.
Examples
Example 1: ir.model.access.csv
Note: Define the dedicated module manager group before loading the CSV (replacehospital_managementwith the module ID). Do not reuse broad settings/administration groups for patient-data roles. This group example targets Odoo 18; verify group fields for the installed version:```xml<record id="group_hospital_manager" model="res.groups"><field name="name">Hospital Manager</field><field name="category_id" ref="base.module_category_hidden"/></record>```
Example 2: Record Rule — Users See Only Their Own Records
Important: No groups makes a rule global (superuser mode bypasses record rules). Global rules intersect; group rules union within those bounds.perm_unlink=Falsemeans this rule is not checked for deletion, not that deletion is denied. ACLs grant operations additively, and record rules default to allow when none apply.
Example 3: Multi-Company Record Rule
Best Practices
- ✅ Do: Start with the most restrictive access and open up as needed.
- ✅ Do: Use
company_ids(plural) in multi-company rules — it reflects the companies active in the current environment; test company switching. - ✅ Do: Test rules using a non-admin user in debug mode —
sudo()bypasses all record rules entirely. - ✅ Do: Create dedicated security groups per module rather than reusing core Odoo groups.
- ❌ Don't: Give
perm_unlink = 1to regular users unless deletion is explicitly required by the business process. - ❌ Don't: Leave
group_idblank inir.model.access.csvunless you intend to grant public (unauthenticated) access. - ❌ Don't: Use
base.group_systemfor module managers — that grants full technical access including server configurations.
Validation and sources
Test as ordinary users with overlapping groups: own/other records, every CRUD operation, active company switching, and portal/public roles. The company rule assumes a company_id field; allowing False deliberately shares unowned records. See Odoo security and multi-company rules.
Limitations
- Field access can be restricted using the ORM field
groupsattribute; hiding a field only in OWL/views is not server-side access control. - Portal and public user access rules have additional nuances not fully covered here; test carefully with
base.group_portal. - Record rules are bypassed by `sudo()` — any code running in superuser context ignores all
ir.ruleentries. - Does not cover row-level security via PostgreSQL (RLS) — Odoo manages all security at the ORM layer.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/odoo-security-rules/SKILL.md
Popularity
- Repository stars
- 24,182
- Repository forks
- 4,158
- Repository npm downloads, 7 days
- 11,772
- 7-day trend score
- 72
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 19 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sickn33/antigravity-awesome-skills/odoo-security-rules)