A Codex skill that applies Odoo 18-20 best practices for module architecture, ORM patterns, XML views, OWL components, security, testing, and performance. Content is aligned with the official Odoo 20.0 documentation.
| Reference | Topics |
|---|---|
module-architecture.md |
Directory structure, __manifest__.py, init chain, _inherit vs _name, migration scripts, hooks |
orm-patterns.md |
Model definition, computed fields, models.Constraint / models.Index, @api.onchange, @api.ondelete, recordsets, Domain safety, index types |
views-owl.md |
XML views (form/list/search), view inheritance, OWL 2 components, actions and menus |
security-i18n.md |
ACLs, record rules, security groups, multi-company, public vs private methods, SQL injection, XSS, translations |
testing-performance.md |
TransactionCase, HttpCase, tours, batch operations, _read_group, profiling |
dev-environment.md |
Source install, odoo-bin options, --dev features, config file, scaffolding, running the server |
official-docs.md |
Curated official documentation index (setup, tutorials, reference, howtos, guidelines) |
external-api.md |
JSON-RPC / XML-RPC / HTTP routes, auth, rate limits, webhooks |
frontend-architecture.md |
Assets, bundles, services, registries, systray, client actions |
testing.md |
Test rig design, real-browser verification (Playwright), regression discipline |
project-roadmap.md |
Phase-by-phase delivery route for real projects: baseline, modeling, state machines, interaction, gates, release |
With npx skills:
npx skills add MercatorProj/odoo-best-practicesOr copy manually into your Codex skills directory:
git clone https://github.com/MercatorProj/odoo-best-practices.git "$CODEX_HOME/skills/odoo-best-practices"The skill activates automatically when Codex detects an Odoo development task (module creation, model/view/security work, debugging, code review). You can also invoke it explicitly with $odoo-best-practices.
SKILL.md loads core rules and routes to the relevant reference file based on the task area. You do not need to read all references for every task.
- Codex CLI or any agent that supports the Codex skill format
- Odoo 18, 19, or 20 development context (defaults to Odoo 20 conventions)
The rules in this skill codify Odoo's design philosophy:
- Everything is a module — even Enterprise features are modules stacked on Community.
- Data is the program — views, actions, menus, and security are database records installed from XML data files.
- Extend, never modify — inherit models, views, and templates; keep the core pristine for painless upgrades.
- XML IDs are the glue —
module.xml_idis the global reference namespace;dependsworks like a system package manager. - Convention over configuration — names map automatically to tables, columns, and UI.
- The ORM is the API and the security boundary — public methods are RPC-exposed; raw SQL bypasses security.
- Integrated by design — one database, shared base models; OWL is the frontend direction.
- Odoo 20.0 developer docs: https://www.odoo.com/documentation/20.0/developer.html
- Setup guide: https://www.odoo.com/documentation/20.0/developer/tutorials/setup_guide.html
- CLI reference: https://www.odoo.com/documentation/20.0/developer/reference/cli.html
- Source install (Python 3.12+): https://www.odoo.com/documentation/20.0/administration/on_premise/source.html
- Coding guidelines (XML ID naming): https://github.com/odoo/documentation/blob/20.0/content/contributing/development/coding_guidelines.rst
- Full curated index: references/official-docs.md