Antigravity-awesome-skills odoo-module-developer
Expert guide for creating custom Odoo modules. Covers __manifest__.py, model inheritance, ORM patterns, and module structure best practices.
install
source · Clone the upstream repo
git clone https://github.com/sickn33/antigravity-awesome-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/sickn33/antigravity-awesome-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/antigravity-awesome-skills/skills/odoo-module-developer" ~/.claude/skills/sickn33-antigravity-awesome-skills-odoo-module-developer-d1ff3d && rm -rf "$T"
manifest:
plugins/antigravity-awesome-skills/skills/odoo-module-developer/SKILL.mdsource content
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
, andcompute
methods correctly.constraint
How It Works
- Activate: Mention
and describe the module you want to build.@odoo-module-developer - Scaffold: Get the full folder structure with
,__manifest__.py
, models, views, and security files.__init__.py - 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/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
with a namespace (e.g.,_name
).hospital.patient - ✅ Do: Use
to add chatter/logging automatically._inherit = ['mail.thread'] - ✅ Do: Specify
in manifest asversion
.{odoo_version}.{major}.{minor}.{patch} - ✅ Do: Set
and'author'
in'website'
so your module is identifiable in the Apps list.__manifest__.py - ❌ Don't: Modify core Odoo model files directly — always use
._inherit - ❌ Don't: Forget to add new models to
or users will get access errors.ir.model.access.csv - ❌ 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
for view XML.@odoo-xml-views-builder - Odoo 13 and below have a different module structure (no
auto-loading) — this skill targets v14+.__manifest__.py - 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
for that.@odoo-automated-tests