odoo-module-developer
Skill này làm gì
Trợ lý này giúp tạo và tổ chức các module tùy chỉnh cho Odoo, một hệ thống quản trị doanh nghiệp. Nó hướng dẫn bạn thiết lập cấu trúc tệp, định nghĩa dữ liệu và tuân theo các thực hành lập trình tốt.
Khi nào nên dùng
- ✓Khi bạn cần tạo một module mới từ đầu trong Odoo.
- ✓Khi muốn thêm tính năng hoặc trường mới vào một module hiện có.
- ✓Khi cần sửa lỗi liên quan đến cấu trúc hoặc cấu hình của một module.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/odoo-module-developer/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tạo một module tên 'inventory_control' với một model cho sản phẩm.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Bạn mô tả module muốn xây dựng. Trợ lý tạo cấu trúc thư mục và tệp cơ bản, gồm tệp cấu hình chính (__manifest__.py) và một tệp ví dụ để định nghĩa dữ liệu (models).
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Odoo Module Developer
Overview
This skill transforms your AI into an expert Odoo custom module developer. It guides you through scaffolding new modules, defining models, setting up security, and following Odoo's coding conventions for both Community and Enterprise editions.
When to Use This Skill
- Starting a new custom Odoo module from scratch.
- Extending an existing Odoo model (e.g., adding fields to
sale.order). - Troubleshooting module loading errors or manifest issues.
- Implementing
onchange,compute, andconstraintmethods correctly.
How It Works
- Activate: Mention
@odoo-module-developerand describe the module you want to build. - Scaffold: Get the full folder structure with
__manifest__.py,__init__.py, models, views, and security files. - Review: Paste existing code and get a review against Odoo best practices.
Examples
Example 1: Scaffold a New Module
Prompt: Create a module called "hospital_management" with a model for patients
Generated structure:
hospital_management/
├── __manifest__.py
├── __init__.py
├── models/
│ ├── __init__.py
│ └── hospital_patient.py
├── views/
│ └── hospital_patient_views.xml
├── security/
│ ├── ir.model.access.csv
│ └── security.xml
└── data/
__manifest__.py:
{
'name': 'Hospital Management',
'version': '17.0.1.0.0',
'category': 'Healthcare',
'depends': ['base', 'mail'],
'data': [
'security/security.xml',
'security/ir.model.access.csv',
'views/hospital_patient_views.xml',
],
'installable': True,
'license': 'LGPL-3',
}
models/hospital_patient.py:
from odoo import models, fields, api
class HospitalPatient(models.Model):
_name = 'hospital.patient'
_description = 'Hospital Patient'
_inherit = ['mail.thread', 'mail.activity.mixin']
name = fields.Char(string='Patient Name', required=True, tracking=True)
birth_date = fields.Date(string='Birth Date')
doctor_id = fields.Many2one('res.users', string='Assigned Doctor')
state = fields.Selection([
('draft', 'New'),
('confirmed', 'Confirmed'),
('done', 'Done'),
], default='draft', tracking=True)
Best Practices
- ✅ Do: Always prefix your model
_namewith a namespace (e.g.,hospital.patient). - ✅ Do: Use
_inherit = ['mail.thread']to add chatter/logging automatically. - ✅ Do: Specify
versionin manifest as{odoo_version}.{major}.{minor}.{patch}. - ✅ Do: Set
'author'and'website'in__manifest__.pyso your module is identifiable in the Apps list. - ❌ Don't: Modify core Odoo model files directly — always use
_inherit. - ❌ Don't: Forget to add new models to
ir.model.access.csvor users will get access errors. - ❌ Don't: Use spaces or uppercase in folder names — Odoo requires snake_case module names.
Limitations
- Does not cover OWL JavaScript components or frontend widget development — use
@odoo-xml-views-builderfor view XML. - The manifest example targets Odoo 17; verify the exact version and supported module/view syntax. Older Odoo releases also use module manifests; do not infer a nonexistent manifest cutoff.
- Does not cover multi-company or multi-website configuration; those require additional model fields (
company_id,website_id). - Does not generate automated test files — use
@odoo-automated-testsfor that.
The displayed tree is a scaffold, not a complete installable module: supply imports, XML views, named groups, ACLs and record rules before claiming it works. Avoid default broad patient-data access; chatter/tracking can disclose sensitive values, so select fields and followers deliberately. Test installation, multi-record compute/constraints and unauthorized access in a disposable database, never through an unrequested production module upgrade.
Câu hỏi thường gặp
Module Odoo là gì?
Module là một gói mã bổ sung chức năng cho hệ thống Odoo, như bán hàng, tồn kho hoặc quản lý kế toán.
File __manifest__.py là gì?
Đây là file cấu hình thiết yếu của mọi module Odoo. Nó chứa thông tin như tên module, phiên bản, các phụ thuộc và các tệp dữ liệu mà module dùng.
“Kế thừa model” nghĩa là gì?
Đây là kỹ thuật mở rộng hoặc chỉnh sửa chức năng của một model (bảng dữ liệu) có sẵn trong Odoo mà không thay đổi mã gốc. Bạn có thể thêm trường, phương thức hoặc quy tắc mới.
Chi tiết
Mô tả gốc của tác giả
Expert guide for creating custom Odoo modules. Covers __manifest__.py, model inheritance, ORM patterns, and module structure best practices.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #5344
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
api-connector-builder
280kGiúp agent của bạn xây dựng kết nối API mới theo đúng mẫu đã có, dùng khi bạn cần thêm một tích hợp mà không tạo cách làm mới.
api-design
280kGiúp agent của bạn thiết kế REST API theo các thực hành tốt nhất, hữu ích để định nghĩa cách API giao tiếp, hiển thị lỗi và tổ chức dữ liệu.
backend-patterns
280kGiúp agent của bạn với các mẫu kiến trúc phía máy chủ và tối ưu cơ sở dữ liệu, hữu ích khi xây dựng hoặc rà soát code chạy trên máy chủ.