odoo-orm-expert

Featured

Master Odoo ORM patterns: search, browse, create, write, domain filters, computed fields, and performance-safe query techniques.

AI & Automation 49,938 stars 7238 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Odoo ORM Expert ## Overview This skill teaches you Odoo's Object Relational Mapper (ORM) in depth. It covers reading/writing records, building domain filters, working with relational fields, and avoiding common performance pitfalls like N+1 queries. ## When to Use This Skill - Writing `search()`, `browse()`, `create()`, `write()`, or `unlink()` calls. - Building complex domain filters for views or server actions. - Implementing computed, stored, and related fields. - Debugging slow queries or optimizing bulk operations. ## How It Works 1. **Activate**: Mention `@odoo-orm-expert` and describe what data operation you need. 2. **Get Code**: Receive correct, idiomatic Odoo ORM code with explanations. 3. **Optimize**: Ask for performance review on existing ORM code. ## Examples ### Example 1: Search with Domain Filters ```python # Find all confirmed sale orders for a specific customer, created this year import datetime start_of_year = datetime.date.today().replace(month=1, day=1).strftime('%Y-%m-%d') orders = self.env['sale.order'].search([ ('partner_id', '=', partner_id), ('state', '=', 'sale'), ('date_order', '>=', start_of_year), ], order='date_order desc', limit=50) # Note: pass dates as 'YYYY-MM-DD' strings in domains, # NOT as fields.Date objects — the ORM serializes them correctly. ``` ### Example 2: Computed Field ```python total_order_count = fields.Integer( string='Total Orders', compute='_compute_total_order_count', store=True ) ...

Details

Author
sickn33
Repository
sickn33/antigravity-awesome-skills
Created
10 months ago
Last Updated
today
Language
Python
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

odoo-perf

Making Odoo fast — recordset hygiene (no query-in-loop, search-once-with-in, mapped/filtered/sorted), the ORM cache & prefetching, stored vs non-stored computed fields (write amplification, exhaustive @api.depends), database indexes (index=True and typed indexes), _read_group aggregation, batch create/write, and justified raw SQL with correct cache invalidation. Use whenever an Odoo page/list/report/cron is slow, an N+1 query pattern appears, you're about to add store=True or an index, or you're writing a loop that search()es or browses one record at a time. Measure real SQL counts from the running instance — don't guess. Targets Odoo 17/18/19.

5 Updated 4 months ago
tuanle96
AI & Automation Listed

odoo

Odoo engineering workflows for addon development, codebase exploration, debugging, architecture/refactor review, manifest/docs sync, and routing to migration work. Use when the user mentions Odoo, addons, modules, manifests, models, XML views, security CSVs, record rules, Odoo shell, OWL/QWeb/assets, or when an Odoo codebase is detected.

3 Updated 1 months ago
Immoderate-humulin783
Data & Documents Listed

odoo-18.0

Odoo 18 development reference for Python models and ORM (search, domain, read_group, compute fields), XML/CSV data and views, OWL/JS client code, QWeb reports, security (ACL, record rules, groups), cron and server actions, migrations and module upgrades, tests, i18n, and performance. Use this skill whenever work involves Odoo 18 or custom addons—even if the user only pastes a traceback, mentions addons/ or __manifest__.py, describes form/list/kanban/XML errors, HTTP controllers, or business rules on models—including building features, fixing bugs, refactoring, or reviewing addon code.

3 Updated 1 months ago
Immoderate-humulin783