Antigravity-awesome-skills odoo-xml-views-builder
Expert at building Odoo XML views: Form, List, Kanban, Search, Calendar, and Graph. Generates correct XML for Odoo 14-17 with proper visibility syntax.
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-xml-views-builder" ~/.claude/skills/sickn33-antigravity-awesome-skills-odoo-xml-views-builder-2965fa && rm -rf "$T"
manifest:
plugins/antigravity-awesome-skills/skills/odoo-xml-views-builder/SKILL.mdsource content
Odoo XML Views Builder
Overview
This skill generates and reviews Odoo XML view definitions for Kanban, Form, List, Search, Calendar, and Graph views. It understands visibility modifiers,
groups, domain, context, and widget usage across Odoo versions 14–17, including the migration from attrs (v14–16) to inline expressions (v17+).
When to Use This Skill
- Creating a new form or list view for a custom model.
- Adding fields, tabs, or smart buttons to an existing view.
- Building a Kanban view with color coding or progress bars.
- Creating a search view with filters and group-by options.
How It Works
- Activate: Mention
and describe the view you want.@odoo-xml-views-builder - Generate: Get complete, ready-to-paste XML view definitions.
- Review: Paste existing XML and get fixes for common mistakes.
Examples
Example 1: Form View with Tabs
<record id="view_hospital_patient_form" model="ir.ui.view"> <field name="name">hospital.patient.form</field> <field name="model">hospital.patient</field> <field name="arch" type="xml"> <form string="Patient"> <header> <button name="action_confirm" string="Confirm" type="object" class="btn-primary" invisible="state != 'draft'"/> <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done"/> </header> <sheet> <div class="oe_title"> <h1><field name="name" placeholder="Patient Name"/></h1> </div> <notebook> <page string="General Info"> <group> <field name="birth_date"/> <field name="doctor_id"/> </group> </page> </notebook> </sheet> <chatter/> </form> </field> </record>
Example 2: Kanban View
<record id="view_hospital_patient_kanban" model="ir.ui.view"> <field name="name">hospital.patient.kanban</field> <field name="model">hospital.patient</field> <field name="arch" type="xml"> <kanban default_group_by="state" class="o_kanban_small_column"> <field name="name"/> <field name="state"/> <field name="doctor_id"/> <templates> <t t-name="kanban-card"> <div class="oe_kanban_content"> <strong><field name="name"/></strong> <div>Doctor: <field name="doctor_id"/></div> </div> </t> </templates> </kanban> </field> </record>
Best Practices
- ✅ Do: Use inline
(Odoo 17+) instead ofinvisible="condition"
for show/hide logic.attrs - ✅ Do: Use
only if you are targeting Odoo 14–16 — it is deprecated in v17.attrs="{'invisible': [...]}" - ✅ Do: Always set a
attribute on your view record for debugging clarity.string - ✅ Do: Use
(v17) or<chatter/>
+ field tags (v16 and below) for activity tracking.<div class="oe_chatter"> - ❌ Don't: Use
in Odoo 17 — it is fully deprecated and raises warnings in logs.attrs - ❌ Don't: Put business logic in view XML — keep it in Python model methods.
- ❌ Don't: Use hardcoded
strings in views when adomain
field on the model can be used dynamically.domain
Limitations
- Does not cover OWL JavaScript widgets or client-side component development.
- Search panel views (
) are not fully covered — those require frontend knowledge.<searchpanel> - Does not address website QWeb views — use
for those.@odoo-qweb-templates - Cohort and Map views (Enterprise-only) are not covered by this skill.