odoo-web-guidelines
GitHub提供Odoo插件前端代码(JS、Owl模板、SCSS)的开发规范,指导文件组织、避免Getters及补丁等最佳实践,适用于编写、审查或迁移static/目录下的代码。
Trigger Scenarios
Install
npx skills add odoo/odoo --skill odoo-web-guidelines -g -y
SKILL.md
Frontmatter
{
"name": "odoo-web-guidelines",
"description": "House rules for the web framework code of Odoo addons: the JavaScript, Owl templates and SCSS in static\/src\/ and static\/tests\/ of any addon (community, enterprise, or custom). Use when writing, reviewing, or moving files under static\/ in an Odoo addon."
}
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.
Version History
- 5.0.0-2-addons Current 2026-09-27 17:16


