一键导入
odoo-best-practices-and-coding-guidelines
Follow official Odoo coding standards, naming conventions, and testing procedures.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Follow official Odoo coding standards, naming conventions, and testing procedures.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
A router skill that identifies and recommends the most appropriate Odoo skill for a given user request.
Create HTTP endpoints for Websites and APIs.
Comprehensive guide to Odoo fields, including basic, relational, computed, and robust technical features (indexing, company_dependent, properties).
Master the Odoo ORM for data manipulation, environment management, and CRUD operations.
Configure Access Control Lists (ACLs) using CSV files.
Write automated tests using TransactionCase and Form emulators to ensure code quality.
| name | Odoo Best Practices and Coding Guidelines |
| description | Follow official Odoo coding standards, naming conventions, and testing procedures. |
Write clean, maintainable, and "Odoo-way" code that passes standard linters and reviews.
module.name (singular). Example: estate.property.EstateProperty.Many2one: partner_id, user_id (suffix _id).One2many/Many2many: line_ids, tag_ids (suffix _ids).action_...: Public methods triggered by buttons (e.g., action_sold)._compute_...: Compute methods (e.g., _compute_total)._onchange_...: Onchange methods.model_name.py (e.g., estate_property.py).Order attributes and methods logically:
_name, _description, _inherit, _order).default_get).@api.constrains).@api.onchange).create, write, unlink).action_...).model_name_view_type (e.g., estate_property_view_form, estate_property_action).module.xml_id when referring to records/views, even within the same module (best practice for clarity).<group> to organize form views.ir.model.access.csv for new models.groups="base.group_user" or custom groups.company_id.pylint-odoo to catch common mistakes like missing descriptions, wrong attribute order, or security holes.