name: odoo-patterns-18 description: > Odoo 18.0-specific patterns for models, modules, OWL components, security, and version-specific behavior. Bridged only when Odoo 18.0 is detected in the project. Combine with patterns-agnostic/ for domain patterns.
Odoo 18.0 Patterns
bundle contains patterns specific to Odoo 18.0. Version-agnostic
domain patterns (accounting, stock, sale, etc.) are in patterns-agnostic/.
Files in This Bundle
model-patterns.md— Model definition, inheritance, fields, ORM methodsmodule-generator.md— Module scaffolding, manifest, file layoutowl-components.md— OWL component patternssecurity-guide.md— Security configuration, access rules, record rulesversion-knowledge.md— v18.0-specific behaviors and constraints
Key Constraints for v18
- Python 3.11+
- OWL 2.x (enhanced)
- NO
attrs=(removed in v17) - Use
<list>NOT<tree> - Use
<chatter/>shortcut element tracking=Truemandatory for audited fields- Type hints strongly recommended
Before Writing Code for v18
- Read relevant file in this bundle (model-patterns.md, etc.)
- Cross-reference
patterns-agnostic/for domain-specific concerns - For migration work, see
migration-{prev}-18/andmigration-18-{next}/