Imported from sozialinfo/opencode (
skills/odoo-web-guidelines/SKILL.md). Install upstream withnpx skills add sozialinfo/opencode --skill odoo-web-guidelines. Copyright stays with the author.
Odoo web guidelines
These rules apply to the web framework code an addon ships in static/src/ and
static/tests/: JavaScript, Owl templates (XML) and SCSS. They do not apply to
static/lib/, which holds vendored or library-style code, nor to the images and
static/description/ an addon ships alongside. They are house rules, not general web
development advice.
Guidelines are grouped by domain, one file per domain in guidelines/, one section per
guideline. No rule outranks another. Read the sections that match the code you are
touching instead of loading whole files.
| Guideline | Read it when |
|---|---|
| Organize files by feature | creating a file, or deciding where new code lives |
| Avoid getters | adding a computed value to a class or a component |
| Avoid patching JavaScript code | extending or overriding behaviour that already exists |
| SCSS and CSS | touching *.scss |
| Assets | adding an image, font, or library |
To add a guideline, follow AUTHORING.md.