skills/odoo-orm-expert/SKILL.md
--- name: odoo-orm-expert description: Master Odoo ORM patterns: search, browse, create, write, domain filters, computed fields, and performance-safe query techniques. category: AI & Agents source: antigravity tags: [python, api, ai, security] url: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/odoo-orm-expert --- # Odoo ORM Expert ## Overview This skill teaches you Odoo's Object Relational Mapper (ORM) in depth. It covers reading/writing records, building domain fil
npx skillsauth add ranbot-ai/awesome-skills skills/odoo-orm-expertInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
search(), browse(), create(), write(), or unlink() calls.@odoo-orm-expert and describe what data operation you need.# 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.
total_order_count = fields.Integer(
string='Total Orders',
compute='_compute_total_order_count',
store=True
)
@api.depends('sale_order_ids')
def _compute_total_order_count(self):
for record in self:
record.total_order_count = len(record.sale_order_ids)
# ✅ GOOD: One query for all records
partners = self.env['res.partner'].search([('country_id', '=', False)])
partners.write({'country_id': self.env.ref('base.us').id})
# ❌ BAD: Triggers a separate query per record
for partner in partners:
partner.country_id = self.env.ref('base.us').id
mapped(), filtered(), and sorted() on recordsets instead of Python loops.sudo() sparingly and only when you understand the security implications.search_count() over len(search(...)) when you only need a count.with_context(...) to pass context values cleanly rather than modifying self.env.context directly.search() inside a loop — this is the #1 Odoo performance killer.datetime/date objects directly into domain tuples — always stringify them as 'YYYY-MM-DD'.cr.execute() raw SQL patterns in depth — use the Odoo performance tuner skill for SQL-level optimization.models.TransientModel) or wizard patterns.testing
Fix SEO indexing issues, crawl budget problems, and Search Console coverage errors for Next.js apps. Covers canonical tags, noindex audits, sitemap health, static rendering, and internal linking.
data-ai
Analyze AI disruption pressure across a business, map competitive exposure, and produce a 90-day defensive action plan.
tools
--- name: longbridge description: 125+ agent skills for Longbridge Securities — real-time quotes, charts, fundamentals, portfolio analysis, options, and more for HK/US/A-share/SG markets. Trilingual: Simplified Chinese, Traditional category: AI & Agents source: antigravity tags: [api, mcp, claude, ai, agent, security, cro] url: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/longbridge --- # Longbridge ## Overview Longbridge is the official skill collection for Longbr
tools
Design, debug, and harden GitHub Actions CI/CD workflows, including reusable workflows, matrix builds, self-hosted runners, OIDC authentication, caching, environments, secrets, and release automation.