[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>
This commit is contained in:
parent
8798f321b3
commit
9a7dfe02db
14 changed files with 1443 additions and 0 deletions
28
.claude/skills/odoo-xml-views/SKILL.md
Normal file
28
.claude/skills/odoo-xml-views/SKILL.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
name: odoo-xml-views
|
||||
description: 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.
|
||||
metadata:
|
||||
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`).
|
||||
Loading…
Add table
Add a link
Reference in a new issue