docs: Express Orders brainstorm handoff to Mac session
Captures all clarifying-question answers + exploration findings so a fresh Claude Code session on Mac can resume at 'propose architectural approaches' without re-running the discovery work. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,160 @@
|
||||
# Express Orders — Brainstorming Handoff (2026-05-25)
|
||||
|
||||
**Status:** Mid-brainstorming. Clarifying questions answered. NOT yet at "propose 2-3 architectural approaches" or "present design sections" stages.
|
||||
|
||||
**Why this handoff exists:** Previous session ran on a Windows machine (the user works from a Mac via Tailscale). Browser preview kept fighting cross-network localhost issues. User asked to restart natively on Mac. This doc preserves everything the brainstorming had reached so the new Mac session resumes instantly without re-asking.
|
||||
|
||||
**How to resume:** When the user opens Claude Code on their Mac and points it at this repo, kick off with:
|
||||
|
||||
> "Resume the Express Orders brainstorming from `docs/superpowers/handoffs/2026-05-25-express-orders-brainstorm-handoff.md`. Skip the visual companion entirely — design in text using the Excel mockup the user already sent. Pick up at 'propose 2-3 architectural approaches'."
|
||||
|
||||
---
|
||||
|
||||
## What "Express Orders" is
|
||||
|
||||
A new sale-order entry surface that will eventually replace the current Direct Order Wizard. UX inspiration: a customer-shared Excel mockup showing a spreadsheet-style flat entry — header grid on top with customer/PO/job#/material-process/lead-time/terms/delivery, line table in the middle with per-row Part-#/Description/Specification/Job#/Thickness/Masking-checkbox/Baking-pill/Notes/Qty/UOM/Price/Subtotal + per-line Upload-Drawing + Open-Part buttons, footer with sub-total/tooling/tax/currency-selector/grand-total.
|
||||
|
||||
Goal: faster repeat-customer order entry. Type once on the line, no jumping to a separate part screen for routine work, every column inline.
|
||||
|
||||
---
|
||||
|
||||
## Clarifying questions ANSWERED
|
||||
|
||||
| # | Question | Answer | Implication |
|
||||
|---|---|---|---|
|
||||
| 1 | Model strategy | **D — new view on existing `fp.direct.order.wizard`** | Reuse the 500+ lines of onchange / recipe-cloning / spec-auto-fill / thickness-carry / tax-seeding logic that already debugged. Add masking/baking/currency fields to the existing model. Write a new "Express" form view. Retire the old direct-order view. Open drafts seamlessly become Express Orders (same DB rows). |
|
||||
| 2 | Specification text storage | **Free-text on the part** — `default_specification_text` Text field on `fp.part.catalog` | Type once → saves to part. Next order for same part → auto-fills. Cell value writes to `sale.order.line.name` (customer-facing). Bypasses the structured `fusion.plating.customer.spec` model entirely — simpler. |
|
||||
| 3 | Per-line Job# column (ABC/DEF/GHJ) | **NEW per-line customer sub-job-ref field** | Header keeps `x_fc_customer_job_number` (e.g. 12345). Add NEW `x_fc_customer_line_ref` Char on sale.order.line. Both print on customer docs. |
|
||||
| 4 | Masking checkbox scope | **Both masking AND de-masking together** | Unchecking creates override(included=False) for every node where `default_kind` IN ('masking', 'de_masking'). Logical pairing — can't unmask what was never masked. |
|
||||
| 5 | Baking field shape | **Free-text input + auto-fill from part default** | Add `default_bake_instructions` Text on `fp.part.catalog`. Type once → saves. Next order → auto-fills. Empty cell = exclude baking node (override included=False on all baking-kind nodes). Non-empty cell = include baking node + write the text to `fp.job.step.instructions` for the bake step at job-creation time. |
|
||||
| 6 | Currency mechanic | **Pricelist-per-currency, labelled "Currency"** | Selector shows currencies the company has pricelists for. Picking USD → looks up company's USD pricelist → sets `sale.order.pricelist_id`. `currency_id` flows from there. Admin must configure one pricelist per currency. |
|
||||
| 7-14 | 8 default interpretations | **All 8 accepted** | PO Pending = keep existing flag + chase mechanism; Material Process = new informational Char; Upload Part Drawing = per-line button to part.drawing_attachment_ids; Create Part = per-line modal opening fp.part.catalog form; Lead Time = reuse min/max days; Blanket SO = reuse boolean; Delivery Method = reuse x_fc_delivery_method; phase-out path = both menus visible initially, retire old view after Express is stable on entech. |
|
||||
|
||||
---
|
||||
|
||||
## Exploration findings (already verified by reading source — these are GROUND TRUTH)
|
||||
|
||||
### Existing `fp.direct.order.wizard` model
|
||||
- Persistent (not transient) — state machine `draft → confirmed → cancelled`
|
||||
- File: `fusion_plating_configurator/wizard/fp_direct_order_wizard.py`
|
||||
- Line model: `fp.direct.order.line` in `fusion_plating_configurator/wizard/fp_direct_order_line.py`
|
||||
- Creates SO in quotation state on confirm. Does NOT auto-confirm SO or auto-email.
|
||||
|
||||
### Existing `sale.order.line` x_fc_* fields (verified — keep using these)
|
||||
- `x_fc_part_catalog_id` Many2one(fp.part.catalog)
|
||||
- `x_fc_internal_description` Text REQUIRED — Notes column maps here
|
||||
- `x_fc_description_template_id` Many2one
|
||||
- `x_fc_serial_ids` Many2many(fp.serial) + `x_fc_serial_id` (primary, computed)
|
||||
- `x_fc_thickness_range` Char — Thickness column maps here
|
||||
- `x_fc_revision_snapshot` Char (frozen at line save time)
|
||||
- `x_fc_process_variant_id` Many2one(fusion.plating.process.node) — recipe
|
||||
- `x_fc_save_as_default_process` Boolean
|
||||
- `x_fc_job_number` Char — shop's auto-sequenced ref (NOT customer's; that's the new x_fc_customer_line_ref)
|
||||
- `x_fc_customer_job_number` related from order
|
||||
- `x_fc_po_number` related from order
|
||||
- `x_fc_part_deadline` Date + offset_days + effective computes
|
||||
- `x_fc_archived` Boolean
|
||||
- `name` (Odoo standard) = customer-facing description — Specification column writes here
|
||||
|
||||
### NEW fields the Express Orders feature must add
|
||||
On `sale.order.line`:
|
||||
- `x_fc_customer_line_ref` Char — per-line customer sub-job (the ABC/DEF/GHJ column)
|
||||
- `x_fc_masking_enabled` Boolean default=True — Masking checkbox
|
||||
- `x_fc_bake_instructions` Text — Baking free-text
|
||||
|
||||
On `fp.part.catalog`:
|
||||
- `default_specification_text` Text — for Spec auto-fill
|
||||
- `default_bake_instructions` Text — for Baking auto-fill
|
||||
|
||||
On `fp.direct.order.wizard` (header):
|
||||
- `material_process` Char — informational order-level tag (ENP-STEEL-HP-ADVANCED)
|
||||
|
||||
On `fp.direct.order.line` (wizard mirror, to be carried to SO line on confirm):
|
||||
- `customer_line_ref` Char
|
||||
- `masking_enabled` Boolean default=True
|
||||
- `bake_instructions` Text
|
||||
|
||||
### Existing `fp.job.node.override` model (verified — schema is exactly 3 fields)
|
||||
File: `fusion_plating_jobs/models/fp_job_node_override.py`
|
||||
- `job_id` Many2one(fp.job) required ondelete=cascade
|
||||
- `node_id` Many2one(fusion.plating.process.node)
|
||||
- `included` Boolean
|
||||
|
||||
**No instructions-text override field.** For the bake free-text feature, do NOT extend this model — instead write the typed text to `fp.job.step.instructions` directly at job-creation time. Simpler, less schema churn.
|
||||
|
||||
### Existing recipe model (`fusion.plating.process.node`)
|
||||
File: `fusion_plating/models/fp_process_node.py`
|
||||
- `default_kind` is a Char (line 526), not Selection — flexible
|
||||
- Values seen: `masking`, `de_masking`, `baking`, plating, inspection, contract_review, racking, etc.
|
||||
- `node_type` is a Selection (line 54): `opt_in`, `opt_out`, `mandatory`, `recipe`
|
||||
|
||||
### Job-creation hook
|
||||
File: `fusion_plating_jobs/models/sale_order.py` — `action_confirm()` calls `_fp_auto_create_job()` which groups lines by recipe. New Express-Orders-driven overrides should be injected here:
|
||||
- Walk each SO line
|
||||
- Resolve the line's recipe
|
||||
- If `x_fc_masking_enabled == False`, create `fp.job.node.override(included=False)` for every node in recipe where `default_kind IN ('masking', 'de_masking')`
|
||||
- If `x_fc_bake_instructions` empty, create `fp.job.node.override(included=False)` for every node in recipe where `default_kind == 'baking'`
|
||||
- If `x_fc_bake_instructions` non-empty, write the text to `fp.job.step.instructions` for the baking step (find by recipe_node_id.default_kind == 'baking')
|
||||
|
||||
### Currency
|
||||
- `sale.order.currency_id` related from `pricelist_id.currency_id` (Odoo native)
|
||||
- No multi-currency customisations in fusion_plating modules — using Odoo standard
|
||||
- Per the answer to Q6, the Express Orders feature adds a selector on the wizard that looks up the matching pricelist by currency code
|
||||
|
||||
### `fp.part.catalog` (file: `fusion_plating_configurator/models/fp_part_catalog.py`)
|
||||
Verified key fields:
|
||||
- `x_fc_default_customer_spec_id` (added by quality module) — NOT used by Express Orders per Q2
|
||||
- `x_fc_default_thickness_range` Char
|
||||
- `description_template_ids` O2M(fp.sale.description.template) with internal + customer descriptions
|
||||
- `drawing_attachment_ids` M2M(ir.attachment) — Upload Part Drawing button writes here
|
||||
- `model_attachment_id` M2O — 3D model
|
||||
- `x_fc_certificate_requirement` Selection — inherit/none/coc/coc_thickness
|
||||
|
||||
---
|
||||
|
||||
## What's LEFT to do (resume here)
|
||||
|
||||
1. ✅ Exploration complete
|
||||
2. ✅ Clarifying questions complete
|
||||
3. ❌ **Propose 2-3 architectural approaches** with the answered constraints baked in. Lead with recommendation. (Most of the architectural picture is already settled by Q1=D; this section should be brief — mostly the "where exactly does the recipe override logic live: in the wizard's `_prepare_order_vals`, or post-confirm in `_fp_auto_create_job`, or a model hook?")
|
||||
4. ❌ **Present design in sections**, get approval after each:
|
||||
- Section 1 — Header layout + field-to-model mapping
|
||||
- Section 2 — Line widget design (the spreadsheet table behavior)
|
||||
- Section 3 — Masking + baking override flow at job creation
|
||||
- Section 4 — Currency switcher mechanic
|
||||
- Section 5 — Inline part create + drawing upload buttons
|
||||
- Section 6 — Phase-out path for direct order
|
||||
5. ❌ **Write design doc** to `docs/superpowers/specs/2026-05-25-express-orders-design.md` and commit
|
||||
6. ❌ **Spec self-review** + user review gate
|
||||
7. ❌ **Transition to writing-plans** skill (after user approves spec)
|
||||
|
||||
---
|
||||
|
||||
## Lesson: SKIP the visual companion on this user's setup
|
||||
|
||||
The user runs Claude Code from their **Mac** via Tailscale into a **Windows** machine (this `Home` host). Browser previews bound to `localhost` on the Windows side are unreachable from the Mac browser. The bash-script brainstorm server (port 65170) hit this. The Python http.server (port 8765) hit this. We spent 20 minutes fighting it.
|
||||
|
||||
**Resolution:** the user said to switch to a native Mac Claude Code session entirely. On Mac the visual companion should "just work" — but consider whether it's necessary. The user already provided an Excel mockup as reference. Text-based design discussion using ASCII tables / structured lists is plenty for this feature. Don't push the visual companion unless the user explicitly asks for it.
|
||||
|
||||
---
|
||||
|
||||
## Recent in-flight work (NOT Express Orders, but on the same Windows host)
|
||||
|
||||
For context: this Windows session also shipped these things today (2026-05-25) — they're DEPLOYED on entech but may need follow-up on the Mac:
|
||||
|
||||
1. **Tablet PIN self-service** (cycle 4) — fully shipped, code 4018 last sent. `fusion_plating_shopfloor` 19.0.36.0.3. Three improvements during the day: SCSS undefined-variable bug fix, switch to `force_send=True`, mail template `email_from` aligned to mail-server `from_filter` (fixes M365 DMARC misalignment / delivery delay).
|
||||
2. **fp_shopfloor_landing removal** — entire OWL component deleted, QR scanner ported into `fp_plant_kanban`, all references cleaned up. Same module version above.
|
||||
3. **Tablet lock-screen orphan localStorage** — cleared `fp_landing_station_id` to fix empty-tiles bug.
|
||||
|
||||
All committed to git on `main`. Pushed via the multi-remote (GitHub + Gitea). On Mac, you'll need to `git pull origin main` from the fresh local clone before doing anything.
|
||||
|
||||
---
|
||||
|
||||
## Files written this session that the new Mac session should know exist
|
||||
|
||||
- `K:\Github\Odoo-Modules\fusion_plating\.claude\launch.json` — Mockups preview config (port 8765). Mac equivalent path will be the same but on local Mac filesystem.
|
||||
- `K:\Github\Odoo-Modules\fusion_plating\.claude\mockups\index.html` — 15KB layout-direction mockup with A/B comparison. Can be deleted (was for the failed Windows-side preview); if you want to show it on Mac it works fine.
|
||||
- `K:\Github\Odoo-Modules\fusion_plating\.superpowers\brainstorm\944-1779751836\` — dead bash-script brainstorm server directory; safe to delete.
|
||||
- This handoff doc.
|
||||
|
||||
End of handoff.
|
||||
Reference in New Issue
Block a user