/odoo-agent-pro-kit:odoo_17_coding_standardfrom Odoo Agent Pro Kit
Applies Odoo 17.0 coding standards for models, views, security, constraints, and performance. Covers view attribute deprecations, SQL constraints, compute method NewId bugs, and RELAX NG schema compliance for XML data files.
Ships in Odoo Agent Pro Kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Apply Odoo 17.0 coding standards for maintainable, upgrade-safe code.
<tree> (lists arrive in 18/19); attrs and states are refused since 17.0 ("Since 17.0, the "attrs" and "states" attributes are no longer used", ir_ui_view.py): write invisible="state != 'draft'", readonly="..."; domains explicit._sql_constraints for DB checks/uniques; @api.constrains for logic.self._context (19 moves to self.env.context).type='json' valid; jsonrpc optional.<chatter/> tag yet.__init__.py.sudo; assert access in business methods..mapped(), indexes on hot domains; batch ops.NewIdA compute (e.g. a related-record count feeding a form smart button) that
builds a dict via read_group()/search_count() keyed by self.id, then
does a raw dict lookup like counts[record.id], throws
KeyError: <NewId 0x... instance> the moment a user opens a brand-new,
unsaved form — the in-memory NewId record is never a key in that dict
because it has no matching related rows yet. Always use counts.get(record.id, 0)
(or equivalent .get() with a safe default) in any compute that indexes a
read_group/aggregate result by record id. This is a real, reproducible bug
class — verified live in production Odoo 18 code, not theoretical (see
docs/docker-sandbox/phase-8/live-test.md step 7 in odoo-agent-pro-kit).
URL: https://github.com/odoo/odoo/blob/17.0/odoo/import_xml.rng
CRITICAL: All XML data files (views, data, security, reports, menus) MUST follow the RELAX NG schema defined in odoo/import_xml.rng. This schema is the authoritative definition of valid XML structure.
Root elements: <odoo>, <openerp>, or <data> (with optional noupdate, auto_sequence, uid, context attributes)
Record structure:
<record id="unique_id" model="model.name">
<field name="field_name">value</field>
<!-- Field types: base64, char, file, int, float, list, tuple, html, xml -->
<!-- Field attributes: ref, eval, search (mutually exclusive) -->
</record>
Template structure:
<template id="unique_id" name="Template Name" inherit_id="base.template" primary="True">
<!-- Optional: t-name, forcecreate, context, priority, groups, active -->
</template>
Menu items:
<!-- Root menu: can have web_icon, action, children -->
<menuitem id="menu_root" name="Root" web_icon="module,static/icon.png" sequence="10"/>
<!-- Sub-menu: requires parent, can have action OR children -->
<menuitem id="menu_sub" name="Sub" parent="menu_root" action="action_id" groups="base.group_user"/>
Window actions:
<act_window id="action_id" name="Action" res_model="model.name" view_mode="tree,form"
domain="[]" context="{}" target="current" groups="base.group_user"
binding_model="other.model" binding_type="action"/>
❌ WRONG:
<record model="ir.ui.view"> <!-- Missing required 'id' -->
<field name="x" type="int" eval="123"/> <!-- Can't mix type with eval -->
<field name="x" ref="module.id" eval="123"/> <!-- Can't mix ref with eval -->
<menuitem id="x" web_icon="icon.png" parent="y"/> <!-- web_icon only for root menus -->
<module> <!-- Invalid root element -->
✅ CORRECT:
<odoo>
<record id="view_form" model="ir.ui.view">
<field name="name">model.form</field>
<field name="arch" type="xml">
<form><field name="name"/></form>
</field>
</record>
</odoo>
xmllint --noout --relaxng odoo/import_xml.rng module/data/file.xmlReference the standard file and call out any intentional deviations with rationale/risks.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub vperfectcs/odoo-agent-pro-kit --plugin odoo-agent-pro-kit31 skills in this plugin
/agent_browser_automationBrowser automation for Odoo web testing, form filling, screenshots, documentation, and frontend validation. Use when testing Odoo web pages, creating module screenshots, validating forms, or automating browser interactions for Odoo 17/18/19./odoo_commanding_systemSlash command router providing three lifecycle commands for Odoo custom app development: /plan-analysis (requirements & PRD generation), /start-coding (task-loop with backend testing), /testing (frontend UI testing & documentation). Version-aware (17|18|19), IDE/CLI agnostic. Works from VS Code, Antigravity, Cursor, or terminal./docker-sandbox-multi-cli-adapterOther plugins' skills for the same job