odoo-18
npx skills add https://github.com/unclecatvn/agent-skills --skill odoo-18
Agent 安装分布
Skill 文档
Odoo 18 Skill – Master Index
Master index for all Odoo 18 guides. Use this to quickly find the appropriate guide for your task.
Quick Reference
| Topic | File | When to Use |
|---|---|---|
| Actions | odoo-18-actions-guide.md |
Creating actions, menus, scheduled jobs, server actions |
| API Decorators | odoo-18-decorator-guide.md |
Using @api decorators, compute fields, validation |
| Data Files | odoo-18-data-guide.md |
XML/CSV data files, records, shortcuts |
| Development | odoo-18-development-guide.md |
Creating modules, manifest, reports, security, wizards |
| Field Types | odoo-18-field-guide.md |
Defining model fields, choosing field types |
| Manifest | odoo-18-manifest-guide.md |
manifest.py configuration, dependencies, hooks |
| Mixins | odoo-18-mixins-guide.md |
mail.thread, activities, email aliases, tracking |
| Model Methods | odoo-18-model-guide.md |
Writing ORM queries, CRUD operations, domain filters |
| Performance | odoo-18-performance-guide.md |
Optimizing queries, fixing slow code, preventing N+1 |
| Reports | odoo-18-reports-guide.md |
QWeb reports, PDF/HTML, templates, paper formats |
| Security | odoo-18-security-guide.md |
Access rights, record rules, field permissions |
| Testing | odoo-18-testing-guide.md |
Writing tests, mocking, assertions, browser testing |
| Translation | odoo-18-translation-guide.md |
Adding translations, localization, i18n |
| Transactions | odoo-18-transaction-guide.md |
Handling database errors, savepoints, UniqueViolation |
| Controllers | odoo-18-controller-guide.md |
Writing HTTP endpoints, routes, web controllers |
| Views & XML | odoo-18-view-guide.md |
Writing XML views, actions, menus, QWeb templates |
| OWL Components | odoo-18-owl-guide.md |
Building OWL UI components, hooks, services |
| Migration | odoo-18-migration-guide.md |
Upgrading modules, data migration, version changes |
Guide Index
Actions Guide
File: odoo-18-actions-guide.md
When to read:
- Creating window actions, URL actions, server actions
- Setting up scheduled/cron jobs
- Configuring report actions
- Creating client-side actions
- Understanding action bindings
Controller Guide
File: odoo-18-controller-guide.md
When to read:
- Creating HTTP endpoints
- Writing web controllers
- Setting up routes
- Choosing auth types (user, public, none)
- Handling JSON vs HTTP responses
Data Files Guide
File: odoo-18-data-guide.md
When to read:
- Creating XML data files
- Understanding record, field, delete, function tags
- Using CSV data files
- Working with shortcuts (menuitem, template, asset)
- Understanding noupdate attribute
Decorator Guide
File: odoo-18-decorator-guide.md
When to read:
- Using
@api.dependsfor computed fields - Using
@api.constrainsfor validation - Using
@api.ondelete(Odoo 18) for delete validation - Using
@api.onchangefor form UI updates - Using
@api.modelfor model-level methods
Development Guide
File: odoo-18-development-guide.md
When to read:
- Creating new modules
- Writing
__manifest__.py - Setting up module structure
- Configuring access rights (CSV)
- Creating record rules
- Building wizards (TransientModel)
- Creating reports
Field Guide
File: odoo-18-field-guide.md
When to read:
- Defining new model fields
- Choosing appropriate field types (Char, Text, Monetary, etc.)
- Setting field parameters (required, default, index, etc.)
- Creating computed fields
- Setting up relational fields (Many2one, One2many, Many2many)
Manifest Guide
File: odoo-18-manifest-guide.md
When to read:
- Configuring
__manifest__.py - Setting up module dependencies
- Defining asset bundles
- Declaring external dependencies (Python, binary)
- Using module hooks (pre_init, post_init, uninstall)
- Understanding auto_install behavior
Migration Guide
File: odoo-18-migration-guide.md
When to read:
- Upgrading modules from earlier versions
- Writing migration scripts (pre, post, end)
- Handling data migration
- Using module hooks (pre_init, post_init, uninstall)
- Version-specific migration logic
Mixins Guide
File: odoo-18-mixins-guide.md
When to read:
- Using mail.thread (messaging, chatter, field tracking)
- Setting up mail.alias.mixin (email aliases)
- Adding mail.activity.mixin (activities)
- Using utm.mixin (campaign tracking)
- Website publishing (website.published.mixin)
- SEO metadata (website.seo.metadata)
- Customer ratings (rating.mixin)
Model Guide
File: odoo-18-model-guide.md
When to read:
- Writing model methods
- Using ORM queries (
search,read,create,write,unlink) - Working with domain filters
- Understanding recordsets and prefetching
- Batch operations
OWL Guide
File: odoo-18-owl-guide.md
When to read:
- Building OWL components
- Using hooks (useState, onWillStart, onMounted, etc.)
- Using services (orm, rpc, action, dialog, notification)
- Component lifecycle management
- JavaScript/OWL translations with
_t()
Performance Guide
File: odoo-18-performance-guide.md
When to read:
- Fixing N+1 query problems
- Optimizing slow code
- Reducing database queries
- Understanding prefetch behavior
- Using
search_read(),read_group(),mapped(),filtered()
Reports Guide
File: odoo-18-reports-guide.md
When to read:
- Creating QWeb reports (PDF/HTML)
- Writing report templates
- Configuring paper formats
- Creating custom reports with _get_report_values
- Adding barcodes to reports
- Using custom fonts
- Creating translatable reports
Security Guide
File: odoo-18-security-guide.md
When to read:
- Configuring access rights (ACL)
- Creating record rules
- Understanding field-level access
- Multi-company security
- Preventing security pitfalls (SQL injection, XSS)
- Public/Portal user security
Testing Guide
File: odoo-18-testing-guide.md
When to read:
- Writing unit tests (TransactionCase)
- Writing browser tests (HttpCase)
- Using test decorators (@tagged, @users, @warmup)
- Testing with Form class
- Mocking external APIs
- Query count assertions
Translation Guide
File: odoo-18-translation-guide.md
When to read:
- Adding translatable strings in Python (
_(),_lt()) - Adding translatable strings in JavaScript (
_t()) - Creating translatable QWeb templates
- Setting up translated fields (
translate=True) - Managing PO files
- Exporting/importing translations
- Working with languages (
res.lang)
Transaction Guide
File: odoo-18-transaction-guide.md
When to read:
- Handling database errors (UniqueViolation, NotNullViolation)
- Using savepoints for error isolation
- Understanding transaction states
- Dealing with serialization failures
- Commit and rollback patterns
View Guide
File: odoo-18-view-guide.md
When to read:
- Writing list views (use
<list>not<tree>in Odoo 18) - Writing form views
- Writing search views
- Creating view inheritance with xpath
- Writing QWeb templates
- Creating actions and menus
File Structure
agent-skills/skills/odoo/18.0/
âââ SKILL.md # THIS FILE - master index
âââ dev/ # Development guides folder
â âââ odoo-18-actions-guide.md # ir.actions.*, cron, bindings
â âââ odoo-18-controller-guide.md # HTTP, routing, controllers
â âââ odoo-18-data-guide.md # XML/CSV data files, records
â âââ odoo-18-decorator-guide.md # @api decorators
â âââ odoo-18-development-guide.md # Manifest, wizards (overview)
â âââ odoo-18-field-guide.md # Field types, parameters
â âââ odoo-18-manifest-guide.md # __manifest__.py reference
â âââ odoo-18-mixins-guide.md # mail.thread, activities, etc.
â âââ odoo-18-model-guide.md # ORM, CRUD, search, domain
â âââ odoo-18-migration-guide.md # Migration scripts, hooks
â âââ odoo-18-owl-guide.md # OWL components, services
â âââ odoo-18-performance-guide.md # N+1 prevention, optimization
â âââ odoo-18-reports-guide.md # QWeb reports, PDF/HTML
â âââ odoo-18-security-guide.md # ACL, record rules, security
â âââ odoo-18-testing-guide.md # Test classes, decorators
â âââ odoo-18-transaction-guide.md # Savepoints, errors
â âââ odoo-18-translation-guide.md # Translations, i18n
â âââ odoo-18-view-guide.md # XML views, QWeb
âââ CLAUDE.md # Claude Code specific
âââ AGENTS.md # AI agents setup
Base Code Reference (Odoo 18)
All guides are based on analysis of Odoo 18 source code:
odoo/models.py– ORM implementationodoo/fields.py– Field typesodoo/api.py– Decoratorsodoo/http.py– HTTP layerodoo/exceptions.py– Exception typesodoo/tools/translate.py– Translation systemodoo/addons/base/models/res_lang.py– Language modeladdons/web/static/src/core/l10n/translation.js– JS translations
For setup instructions with different AI IDEs, see AGENTS.md