CLAUDE.md: comprehensive update — all 8 phases built, 29 models documented
- Added 7 new modules to structure (configurator, receiving, invoicing, certificates, notifications, fusion_tasks) - Added 5 new critical rules (res.groups privilege_id, XML comments, XML action ordering, module install flag, implied group cascade) - Updated naming conventions (fp.* prefix for new models, currency_id) - All 3 workflow gaps marked DONE with implementation details - Architectural decisions documented (recipe→WO, account hold, email, configurator, model naming, security groups) - Key models table expanded from 13 to 29 models Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,43 +5,56 @@ Fusion Plating is a multi-module Odoo 19 ERP for electroless nickel plating and
|
||||
|
||||
## Module Structure
|
||||
```
|
||||
fusion_plating/ — Core: facilities, process types, tanks, baths, chemistry, recipes
|
||||
fusion_plating_shopfloor/ — Tablet UI, plant overview kanban, process tree visualization
|
||||
fusion_plating_portal/ — Customer portal
|
||||
fusion_plating_reports/ — PDF reports (WO margin, discharge sample, etc.)
|
||||
fusion_plating_compliance/ — Compliance framework, jurisdictions
|
||||
fusion_plating_aerospace/ — AS9100 / Nadcap
|
||||
fusion_plating_nuclear/ — CSA N299 / CNSC
|
||||
fusion_plating_cgp/ — Controlled Goods Program
|
||||
fusion_plating_safety/ — SDS, WHMIS, JHSC
|
||||
fusion_plating_quality/ — QMS (NCR, CAPA, calibration)
|
||||
fusion_plating_logistics/ — Pickup & delivery
|
||||
fusion_plating_culture/ — Values / fundamentals
|
||||
fusion_plating_bridge_mrp/ — MRP integration (extends mrp.workorder)
|
||||
fusion_plating_bridge_sign/ — Digital signatures
|
||||
fusion_plating_bridge_quality/ — Quality bridge
|
||||
fusion_plating_process_en/ — Electroless nickel process pack
|
||||
fusion_plating_process_chrome/ — Chrome process pack
|
||||
fusion_plating_process_anodize/ — Anodizing process pack
|
||||
fusion_plating/ — Core: facilities, process types, tanks, baths, chemistry, recipes
|
||||
fusion_plating_configurator/ — Quotation configurator, pricing engine, part catalog, 3D viewer
|
||||
fusion_plating_receiving/ — Parts receiving, inspection, damage logging
|
||||
fusion_plating_invoicing/ — Invoice strategies (deposit/progress/net/COD), account holds
|
||||
fusion_plating_certificates/ — Certificate registry (CoC, thickness reports), Fischerscope data
|
||||
fusion_plating_notifications/ — Auto-email engine, notification templates, audit log
|
||||
fusion_plating_shopfloor/ — Tablet UI, plant overview kanban, process tree visualization
|
||||
fusion_plating_portal/ — Customer portal + self-service configurator wizard
|
||||
fusion_plating_reports/ — PDF reports (WO margin, discharge sample, CoC, etc.)
|
||||
fusion_plating_compliance/ — Compliance framework, jurisdictions
|
||||
fusion_plating_aerospace/ — AS9100 / Nadcap
|
||||
fusion_plating_nuclear/ — CSA N299 / CNSC
|
||||
fusion_plating_cgp/ — Controlled Goods Program
|
||||
fusion_plating_safety/ — SDS, WHMIS, JHSC
|
||||
fusion_plating_quality/ — QMS (NCR, CAPA, calibration)
|
||||
fusion_plating_logistics/ — Pickup & delivery, chain of custody
|
||||
fusion_plating_culture/ — Values / fundamentals
|
||||
fusion_plating_bridge_mrp/ — MRP integration (recipe→WO, portal job, delivery bridge)
|
||||
fusion_plating_bridge_sign/ — Digital signatures
|
||||
fusion_plating_bridge_quality/ — Quality bridge
|
||||
fusion_plating_process_en/ — Electroless nickel process pack
|
||||
fusion_plating_process_chrome/ — Chrome process pack
|
||||
fusion_plating_process_anodize/ — Anodizing process pack
|
||||
fusion_plating_process_black_oxide/ — Black oxide process pack
|
||||
fusion_tasks/ — Local delivery dispatch (GPS, maps, driver scheduling)
|
||||
```
|
||||
|
||||
## Critical Rules — Odoo 19
|
||||
1. **NEVER code from memory** — Read reference files from the server first.
|
||||
2. **Backend OWL**: `static template`, `static props = ["*"]`, standalone `rpc()` from `@web/core/network/rpc`. NOT `useService("rpc")`.
|
||||
3. **HTTP routes**: `type="jsonrpc"` — NOT `type="json"` (deprecated in Odoo 19).
|
||||
4. **Search views**: NO `group expand="0"`, NO `string` attribute on `<search>`, NO `<group string="...">` wrapper for group-by filters.
|
||||
4. **Search views**: NO `group expand="0"`, NO `string` attribute on `<search>`, NO `<group string="...">` wrapper for group-by filters. Use bare `<group>` for group-by.
|
||||
5. **res.config.settings**: Only boolean/integer/float/char/selection/many2one/datetime. NO Date fields.
|
||||
6. **Field params**: `parent_path` does NOT accept `unaccent` parameter in Odoo 19.
|
||||
7. **SCSS borders**: Use `$border-color` (SCSS variable) for card borders, NOT `color-mix()` in border shorthand — the SCSS compiler drops it. `color-mix()` works fine in `background-color`, `box-shadow`, etc.
|
||||
8. **Theme awareness**: All colours must use CSS custom properties (`var(--bs-body-bg)`, `var(--bs-body-color)`, `var(--bs-border-color)`, `var(--bs-secondary-color)`, `var(--o-action)`). NO hardcoded hex. See `fusion_plating_shopfloor.scss` as the gold standard.
|
||||
6. **res.groups**: Use `privilege_id` (NOT `category_id`). `user_ids` is OK but the deprecated `users` alias is NOT. Always include `sequence` field.
|
||||
7. **Field params**: `parent_path` does NOT accept `unaccent` parameter in Odoo 19.
|
||||
8. **SCSS borders**: Use `$border-color` (SCSS variable) for card borders, NOT `color-mix()` in border shorthand — the SCSS compiler drops it. `color-mix()` works fine in `background-color`, `box-shadow`, etc.
|
||||
9. **Theme awareness**: All colours must use CSS custom properties (`var(--bs-body-bg)`, `var(--bs-body-color)`, `var(--bs-border-color)`, `var(--bs-secondary-color)`, `var(--o-action)`). NO hardcoded hex. See `fusion_plating_shopfloor.scss` as the gold standard.
|
||||
10. **XML comments**: No double-hyphens (`--`) inside `<!-- -->` comments — invalid XML, causes lxml parse error.
|
||||
11. **XML data ordering**: Window actions must be defined BEFORE `<menuitem>` elements that reference them in the same file.
|
||||
12. **Module install on new modules**: Use `--update=base` alongside `-i MODULE` to ensure Odoo rescans the addons path and finds the new module directory.
|
||||
13. **Implied group cascade**: `implied_ids` on `res.groups` does NOT reliably propagate to users on module install. Always include `user_ids` to explicitly assign admin, or fix via SQL post-install.
|
||||
|
||||
## Naming
|
||||
- New fields on **custom models**: standard names (no prefix needed)
|
||||
- New fields on **standard Odoo models**: `x_fc_*` prefix
|
||||
- Legacy fields: `x_studio_*`
|
||||
- **New custom models** (post-2026-04): `fp.*` prefix (e.g. `fp.part.catalog`, `fp.certificate`)
|
||||
- **Existing custom models**: Keep `fusion.plating.*` (e.g. `fusion.plating.portal.job`, `fusion.plating.delivery`)
|
||||
- **New fields on standard Odoo models**: `x_fc_*` prefix
|
||||
- **Legacy fields**: `x_studio_*`
|
||||
- Canadian English for all user-facing text
|
||||
- SCSS class prefix: `o_fp_*` (shopfloor: `o_fp_po_*`, `o_fp_pt_*`; recipes: `o_fp_recipe_*`)
|
||||
- Monetary fields: always pair with `currency_id` field on the same model
|
||||
|
||||
## Process Recipe System (NEW — v19.0.2.x)
|
||||
**Model**: `fusion.plating.process.node` (in `fusion_plating` core)
|
||||
@@ -177,10 +190,10 @@ Project: `nexasystems` (id: `ikvdlqkbqsitabxidvnq`)
|
||||
│ → Opens fp.recipe.config.wizard for opt-in/out │
|
||||
│ → Creates fusion.plating.job.node.override records │
|
||||
│ │
|
||||
│ 6. Work orders generated from recipe [NOT BUILT] │
|
||||
│ → Convert recipe operation nodes → mrp.workorder │
|
||||
│ → Respect opt-in/out overrides │
|
||||
│ → Map work_center_id, estimated_duration, etc. │
|
||||
│ 6. Work orders generated from recipe [DONE] │
|
||||
│ → _generate_workorders_from_recipe() in bridge_mrp │
|
||||
│ → One WO per operation node, steps become WO instructions │
|
||||
│ → Respects opt-in/out overrides from job.node.override │
|
||||
│ │
|
||||
│ 7. Operators execute WOs on shopfloor [DONE] │
|
||||
│ → Plant Overview kanban (drag between work centres) │
|
||||
@@ -207,17 +220,18 @@ Project: `nexasystems` (id: `ikvdlqkbqsitabxidvnq`)
|
||||
│ → FpDelivery.action_mark_delivered() override │
|
||||
│ → Sets actual_ship_date + tracking_ref on portal job │
|
||||
│ │
|
||||
│ 12. Account hold check before invoicing [NOT BUILT] │
|
||||
│ → Flag on res.partner blocking invoice creation │
|
||||
│ → Prevents shipping to customers with overdue balances │
|
||||
│ 12. Account hold check before invoicing [DONE] │
|
||||
│ → x_fc_account_hold on res.partner (fusion_plating_invoicing)│
|
||||
│ → Blocks SO confirm, invoice post, shipping for non-managers │
|
||||
│ │
|
||||
│ 13. Invoice posted → Portal job complete [DONE] │
|
||||
│ → AccountMove.action_post() override │
|
||||
│ → Sets invoice_ref on portal job, state → complete │
|
||||
│ │
|
||||
│ 14. Auto-email with CoC + Invoice + Tracking [NOT BUILT] │
|
||||
│ → mail.template triggered on delivery/invoice │
|
||||
│ → Attaches: CoC PDF, Invoice PDF, tracking info │
|
||||
│ 14. Auto-email with CoC + Invoice + Tracking [DONE] │
|
||||
│ → fusion_plating_notifications module │
|
||||
│ → fp.notification.template (configurable per trigger event) │
|
||||
│ → fp.notification.log (audit trail) │
|
||||
└──────────────────────────────────────────────────────────────────┘
|
||||
|
||||
┌─ CUSTOMER PORTAL ────────────────────────────────────────────────┐
|
||||
@@ -235,19 +249,25 @@ Project: `nexasystems` (id: `ikvdlqkbqsitabxidvnq`)
|
||||
- "Overrides" stat button on MO form
|
||||
- Located in `fusion_plating_bridge_mrp`
|
||||
|
||||
### 3 Remaining Gaps
|
||||
### All Gaps Resolved (2026-04-12/13)
|
||||
|
||||
| Gap | Description | Module |
|
||||
|-----|-------------|--------|
|
||||
| **Recipe → Work Orders** | Convert recipe operation nodes into mrp.workorder records, respecting opt-in/out overrides. Map work_center_id, estimated_duration. | `fusion_plating_bridge_mrp` |
|
||||
| **Account Hold Check** | Flag on res.partner that blocks invoice creation / shipping for customers with overdue balances. | `fusion_plating_bridge_mrp` or new module |
|
||||
| **Auto-Email Package** | On delivery marked shipped (or invoice posted), auto-send email to customer with CoC PDF + Invoice PDF + tracking info. | `fusion_plating_bridge_mrp` |
|
||||
| Gap | Resolution | Module |
|
||||
|-----|-----------|--------|
|
||||
| **Recipe → Work Orders** | `_generate_workorders_from_recipe()` — one WO per operation, steps become instructions | `fusion_plating_bridge_mrp` v2.1.0 |
|
||||
| **Account Hold Check** | `x_fc_account_hold` on res.partner, blocks SO/invoice/shipping for non-managers | `fusion_plating_invoicing` |
|
||||
| **Auto-Email Package** | `fp.notification.template` + `fp.notification.log` with hooks on SO confirm, receiving, invoice | `fusion_plating_notifications` |
|
||||
| **Quotation Configurator** | Part catalog, coating configs, pricing engine, 3D STL viewer, portal wizard | `fusion_plating_configurator` |
|
||||
| **Parts Receiving** | Receiving records, inspection, damage logging, SO auto-create, MRP soft gate | `fusion_plating_receiving` |
|
||||
| **Certificate Registry** | Unified fp.certificate with thickness readings, CoC/thickness/Nadcap types | `fusion_plating_certificates` |
|
||||
| **Local Delivery** | Forked fusion_tasks with GPS/maps, stripped of claims/sync, delivery-specific fields | `fusion_tasks` |
|
||||
|
||||
### Key Architectural Decisions Needed
|
||||
1. **Recipe → WO mapping**: One WO per `operation` node? Or one per `step`? (Recommend: one per `operation`, steps become WO instructions)
|
||||
2. **Account hold**: Flag on `res.partner`? Or computed from `account.move` aging? (Check Steelhead)
|
||||
3. **Email trigger**: On delivery completion? On invoice posting? Both? (Check with client)
|
||||
4. **Product Configurator**: Extend standard Odoo or build custom? (Need to see Steelhead's quote flow)
|
||||
### Architectural Decisions Made
|
||||
1. **Recipe → WO**: One WO per `operation` node, child `step` nodes become numbered instructions in WO description
|
||||
2. **Account hold**: Manual flag on `res.partner` (auto from aging is roadmap)
|
||||
3. **Email triggers**: SO confirmed, parts received, invoice posted (configurable per trigger)
|
||||
4. **Configurator**: Custom build with formula-based pricing, estimator override, portal self-service wizard
|
||||
5. **Model naming**: New models use `fp.*` prefix, existing keep `fusion.plating.*`
|
||||
6. **Security groups**: Role-based (Estimator, Receiving, Accounting, Shop Manager) layered on existing privilege hierarchy (Operator→Supervisor→Manager→Admin)
|
||||
|
||||
### Key Models Quick Reference
|
||||
|
||||
@@ -256,7 +276,21 @@ Project: `nexasystems` (id: `ikvdlqkbqsitabxidvnq`)
|
||||
| `fusion.plating.process.node` | `fusion_plating` | Recipe tree (template) |
|
||||
| `fusion.plating.process.node.input` | `fusion_plating` | Operator input definitions |
|
||||
| `fusion.plating.job.node.override` | `fusion_plating_bridge_mrp` | Per-job opt-in/out |
|
||||
| `fp.quote.request` | `fusion_plating_portal` | Customer RFQ |
|
||||
| `fp.part.catalog` | `fusion_plating_configurator` | Customer part library (geometry, material) |
|
||||
| `fp.coating.config` | `fusion_plating_configurator` | Coating configuration templates |
|
||||
| `fp.treatment` | `fusion_plating_configurator` | Pre/post treatment steps |
|
||||
| `fp.pricing.rule` | `fusion_plating_configurator` | Formula-based pricing engine |
|
||||
| `fp.pricing.complexity.surcharge` | `fusion_plating_configurator` | Complexity surcharge lines |
|
||||
| `fp.quote.configurator` | `fusion_plating_configurator` | Configurator session + price calc |
|
||||
| `fp.receiving` | `fusion_plating_receiving` | Parts receiving record |
|
||||
| `fp.receiving.line` | `fusion_plating_receiving` | Per-part receiving detail |
|
||||
| `fp.receiving.damage` | `fusion_plating_receiving` | Damage log entry |
|
||||
| `fp.invoice.strategy.default` | `fusion_plating_invoicing` | Customer-level invoice strategy |
|
||||
| `fp.certificate` | `fusion_plating_certificates` | Certificate registry (CoC, thickness, etc.) |
|
||||
| `fp.thickness.reading` | `fusion_plating_certificates` | Fischerscope measurement data |
|
||||
| `fp.notification.template` | `fusion_plating_notifications` | Configurable email notification |
|
||||
| `fp.notification.log` | `fusion_plating_notifications` | Email audit trail |
|
||||
| `fusion.plating.quote.request` | `fusion_plating_portal` | Customer RFQ |
|
||||
| `fusion.plating.portal.job` | `fusion_plating_portal` | Portal-facing job tracker |
|
||||
| `fusion.plating.customer.spec` | `fusion_plating_quality` | Spec library |
|
||||
| `fusion.plating.quality.hold` | `fusion_plating_quality` | Parts on hold |
|
||||
@@ -266,6 +300,8 @@ Project: `nexasystems` (id: `ikvdlqkbqsitabxidvnq`)
|
||||
| `fusion.plating.delivery` | `fusion_plating_logistics` | Delivery with chain of custody |
|
||||
| `fusion.plating.pickup.request` | `fusion_plating_logistics` | Customer pickup requests |
|
||||
| `fusion.plating.route` | `fusion_plating_logistics` | Driver routes with stops |
|
||||
| `fusion.technician.task` | `fusion_tasks` | Local delivery task (GPS, maps) |
|
||||
| `fusion.technician.location` | `fusion_tasks` | Driver GPS tracking |
|
||||
|
||||
## Repackaged Enterprise Modules
|
||||
See `K:\Github\RePackaged-Odoo\CLAUDE.md` for full details. Key points:
|
||||
|
||||
Reference in New Issue
Block a user