← ClaudeAtlas

odoo-module-scaffoldlisted

Creating a new Odoo module/addon from scratch, or fixing a module that won't install — __manifest__.py (depends, the data load order, assets bundles), __init__ wiring, directory layout (models/views/security/data/static/wizard/ report/controllers), and the model + ir.model.access.csv + menu/action/view skeleton that makes a module actually appear. Use whenever scaffolding an Odoo addon, adding the first model to a module, wiring a new .py into __init__, or deciding which addons to `depends` on — even if the user never says "skill". `depends` is not cosmetic: it fixes which MRO layer your overrides land at, so read the recommended depends from the `odoo-introspect` skill (model_brief) before writing it. Never guess the structure.
tuanle96/odoo-ai-skills · ★ 4 · AI & Automation · score 62
Install: claude install-skill tuanle96/odoo-ai-skills
# Odoo module scaffold A module installs only when its declared structure matches what the registry expects: every Python file imported, every data file listed in `__manifest__.py`, and listed **in dependency order**. A model file you forgot to import, or a security file loaded after the view that needs its group, fails — sometimes loudly, often silently (the element just never appears). **Version floor: Odoo 17/18, through Odoo 19 (current LTS).** Layout/manifest below is current; pre-17 deltas → `skills/odoo-introspect/references/version-matrix.md`. ## `depends` decides your MRO layer — introspect first `depends` is the one manifest key with weight beyond "make it install": it sets module load order, which sets where your class lands in the model's MRO. Override `sale.order` while depending only on `sale` (not `sale_stock`) and your method sits at a *different layer* than the stock hooks — `super()` then reaches a different chain than you expect. Before writing `depends`, run the `odoo-introspect` skill's **model_brief** on the model you extend: it reports the **recommended manifest depends** for the fields/methods you touch. Add only what you use. (→ `odoo-dev` for the override itself.) ## Standard layout | Path | Holds | Notes | |---|---|---| | `__manifest__.py` | module metadata | required; defines load order | | `__init__.py` | `from . import models, wizard, …` | top-level subpackages | | `models/__init__.py` | `from . import <file>` per model file | one line per