agentleFS
actinon-comactinon-com/brass-monkey/skills/odoo-security/SKILL.md

odoo-security

Skill2 starsChanged 3 months agoMITView on GitHub

Functional expertise in Odoo's security and permission architecture, covering Users, Groups, Access Rights, and Record Rules.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Mandate: When creating or updating records, ensure the company_id is set correctly.

    line 26
  2. Distinctive:

    When a user encounters an "Access Error":

    line 29
  3. Very specific:

    Groups: Verify the user's assigned groups in res.users.

    line 30
  4. Very specific:

    Access Rights: Check ir.model.access for the target model and the user's groups.

    line 31
  5. Very specific:

    Record Rules: Check ir.rule for active domains on the target model.

    line 32

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: Odoo Security & Access Control

This skill provides the agent with high-level functional expertise in Odoo's security and permission architecture, covering Users, Groups, Access Rights, and Record Rules.

Core Mandates

1. The Security Hierarchy

Understand how Odoo grants permissions:

  • Users (res.users): Individual accounts.
  • Groups (res.groups): Logical roles (e.g., "Sales / User", "Accounting / Manager").
  • Access Rights (ir.model.access): Model-level permissions (Can I Read/Write/Create/Delete ANY record in this model?).
  • Record Rules (ir.rule): Row-level permissions (Can I see THIS specific record?). Enforced via domain_force filters.

2. Record Rule Enforcement

  • Mandate: Record rules strictly filter data at the database level. Even if a user has "Read" access on a model via Access Rights, a Record Rule can hide specific records.
  • Evaluation: Odoo applies Record Rules using specific logic:
    • Global Rules: (no group assigned) are applied using AND (all must pass).
    • Group Rules: (assigned to a group) are applied using OR among rules of the same group.

3. Multi-Company Security

  • Strict Isolation: Odoo uses Record Rules to enforce multi-company isolation.
  • Mandate: When creating or updating records, ensure the company_id is set correctly. Attempting to link records from different companies (e.g., a Sales Order in Company A pointing to a Warehouse in Company B) will trigger a "Multi-company Access Error".

4. Troubleshooting Workflow

When a user encounters an "Access Error":

  1. Groups: Verify the user's assigned groups in res.users.
  2. Access Rights: Check ir.model.access for the target model and the user's groups.
  3. Record Rules: Check ir.rule for active domains on the target model. Analyze the domain_force to see if it's filtering out the specific record ID.

Available Resources

  • security-logic.md: Deep-dive into Access Rights vs. Record Rules, Evaluation Logic, and Multi-company rules.
  • security-fields.json: Technical map for Users, Groups, Access, and Rule models.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.