odoo-security-rules

Featured

Expert in Odoo access control: ir.model.access.csv, record rules (ir.rule), groups, and multi-company security patterns.

AI & Automation 49,938 stars 7238 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 1. **Activate**: Mention `@odoo-security-rules` and describe the access scenario. 2. **Generate**: Get correct CSV access lines and XML record rules. 3. **Debug**: Paste an access error and get a diagnosis with the fix. ## Examples ### Example 1: ir.model.access.csv ```csv id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_hospital_patient_user,hospital.patient.user,model_hospital_patient,base.group_user,1,0,0,0 access_hospital_patient_manager,hospital.patient.manager,model_hospital_patient,base.group_erp_manager,1,1,1,1 ``` > **Note:** Use `base.group_erp_manager` for ERP managers, not `base.group_system` — that group is reserved for Odoo's technical superusers. Always create a custom group for module-specific manager roles: > > ```xml > <record id="group_hospital_manager" model="res.groups"> > <field name="name">Hospital Manager</field> > ...

Details

Author
sickn33
Repository
sickn33/antigravity-awesome-skills
Created
10 months ago
Last Updated
today
Language
Python
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

odoo-security

Authoring or debugging Odoo access control — ACL (ir.model.access.csv), record rules (ir.rule), groups (res.groups + implied_ids), field-level groups, sudo(), with_user / with_company, and multi-company row isolation. Use whenever a change "works for admin but fails for a normal user", an AccessError or "you are not allowed to" appears, a new model needs permissions, you're about to reach for sudo(), or you'd otherwise GUESS which groups grant what or why a user sees too many / too few rows. Effective access is composed at runtime from every installed addon — read the real ACL + rule dossier first, never guess. Targets Odoo 17/18/19.

5 Updated 4 months ago
tuanle96
AI & Automation Featured

odoo-rpc-api

Expert on Odoo's external JSON-RPC and XML-RPC APIs. Covers authentication, model calls, record CRUD, and real-world integration examples in Python, JavaScript, and curl.

49,938 Updated today
sickn33
Data & Documents Listed

odoo-dev

Odoo 15-20 development rules with source proof: trace before coding, native first, TDD, index decisions, version differences, porting a module up or down between versions, controller and model security, ORM/test/view/report traps. Use for ANY Odoo work: fields, models, inherits, views/xpath, wizards, QWeb reports, cron, controllers/API, ACL/record rules/groups, porting or migrating a module, tests, performance, Settings, a security review, or a traceback / ParseError / "Field does not exist" / missing xmlid / slow query. Also for "does Odoo already have X" and "where is this model/field/xmlid".

0 Updated yesterday
Aghyksa