addons-cm/.claude/skills/odoo-xml-views/SKILL.md
GitHub Copilot 9a7dfe02db [ADD] Claude Code ecosystem adapted from Copilot config
Port .github Copilot setup to Claude Code:
- CLAUDE.md: condensed project instructions (auto-loaded each session)
- .claude/skills: per-language guides (odoo-python, odoo-xml-views,
  odoo-qweb-html, odoo-javascript) + openspec-* workflow skills
- .claude/commands/opsx: /opsx:explore|propose|apply|archive slash commands

Original .github/ files kept untouched as extended reference.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 13:29:10 +02:00

1.3 KiB

name description metadata
odoo-xml-views XML/Odoo views conventions for this repo (XPath, inheritance, IDs, security, manifest data). Use when editing .xml views, security/, or XML data in Odoo addons.
type
reference

XML (Odoo Views)

Style and conventions

  • Indentation: 4 spaces (no tabs).
  • XPath with explicit position: before, after, inside, replace, attributes.
  • Reference groups via module.xml_id (e.g. sales_team.group_sale_manager).
  • sequence to order fields in views.
  • IDs: module.descriptive_name pattern.
  • No conditional logic in QWeb, only access to attributes prepared in the controller.
  • Translate strings in XML, never with _() in Python field definitions.

Key patterns

  • Views in views/*.xml. Typical manifest data order: security/ir.model.access.csv, views/actions.xml, views/menu.xml, views/<model>_views.xml.
  • Security: id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink.
  • Common groups: base.group_user, base.group_system, sales_team.group_sale_manager, purchase.group_purchase_manager.

Common mistakes

  • XPath not found → check inheritance chain and correct XML IDs.
  • Complex logic in QWeb → move it to the controller (see docs/QWEB_BEST_PRACTICES.md).