41 lines
1.9 KiB
Markdown
41 lines
1.9 KiB
Markdown
# Odoo Modules — Claude Code Instructions
|
|
|
|
## Project
|
|
27 custom Odoo 19 modules for Fusion Central (Westin Healthcare + NEXA Systems).
|
|
|
|
## Critical Rules — Odoo 19
|
|
1. **NEVER code from memory** — Always read a reference file from Docker first:
|
|
```bash
|
|
docker exec odoo-dev-app cat /usr/lib/python3/dist-packages/odoo/addons/<module>/static/src/<path>
|
|
```
|
|
2. **Frontend JS**: Use `Interaction` class from `@web/public/interaction`, registered via `registry.category("public.interactions")`. NOT IIFE/DOMContentLoaded.
|
|
3. **Backend OWL**: Use standalone `rpc()` from `@web/core/network/rpc`. NOT `useService("rpc")`. `static props = []` not `{}`.
|
|
4. **HTTP routes**: `type="jsonrpc"` — NOT `type="json"` (deprecated).
|
|
5. **res.config.settings**: Only boolean/integer/float/char/selection/many2one/datetime. NO Date fields.
|
|
6. **res.groups**: NO `users` field, NO `category_id` field.
|
|
7. **Search views**: NO `group expand="0"` syntax.
|
|
|
|
## Naming
|
|
- New fields: `x_fc_*` prefix
|
|
- Legacy fields: `x_studio_*`
|
|
- Canadian English for all user-facing text
|
|
- Currency: `$` sign with Monetary fields + currency_id
|
|
|
|
## Cursor-Managed Modules
|
|
- **fusion_clock** is currently being modified in Cursor — always read files fresh before editing, don't assume you know the current state
|
|
|
|
## Workflow
|
|
- Local dev: `docker exec odoo-dev-app odoo -d fusion-dev -u <module> --stop-after-init`
|
|
- Local URL: http://localhost:8069
|
|
- Test before deploying. Edit existing files — don't create unnecessary new ones.
|
|
|
|
## Supabase Knowledge Base
|
|
Before starting unfamiliar work, check Supabase for context:
|
|
```bash
|
|
PGPASSWORD='a09e12e0995dc29446631fa458f3d4b3' psql -h 100.74.28.73 -p 5433 -U postgres -d postgres
|
|
```
|
|
- `fusionapps.decisions` — past architecture decisions
|
|
- `fusionapps.issues` — known issues and fixes
|
|
- `fusionapps.code_snippets` — reference code
|
|
- `fusionapps.quick_commands` — deployment and admin commands
|