From d3c5c258654f1dd13422f747f1ad74f4f14428d2 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Sun, 17 May 2026 03:20:33 -0400 Subject: [PATCH] changes --- ...-05-17-portal-dashboard-redesign-design.md | 4 +- fusion_plating/fusion_plating/__manifest__.py | 2 +- .../fusion_plating/models/fp_process_node.py | 5 + .../__manifest__.py | 2 +- .../models/res_config_settings.py | 7 +- .../views/res_config_settings_views.xml | 14 +- .../__manifest__.py | 2 +- .../wizard/fp_direct_order_line.py | 144 ++++++++++++++++-- .../wizard/fp_direct_order_wizard.py | 14 +- .../fusion_plating_jobs/__manifest__.py | 2 +- .../report/report_fp_job_sticker.xml | 51 ++++--- .../report/report_fp_job_wo_detail.xml | 98 ++++++++++-- .../views/fp_sale_order_portal.xml | 63 ++++++++ .../fusion_plating_quality/__manifest__.py | 6 +- .../models/fp_direct_order_line_inherit.py | 50 +++++- .../models/fp_part_catalog.py | 31 +++- .../models/res_company.py | 12 +- .../models/res_config_settings.py | 4 +- .../static/src/js/contract_review_redirect.js | 51 +++++++ .../views/res_config_settings_views.xml | 13 +- .../fusion_plating_reports/__manifest__.py | 2 +- .../report/report_actions.xml | 3 + .../report/report_base_styles.xml | 99 +++++++++--- .../report/report_coc.xml | 19 +-- .../report/report_coc_chronological.xml | 17 +-- .../report/report_fp_invoice.xml | 20 +-- .../report/report_fp_packing_slip.xml | 4 +- .../report/report_fp_sale.xml | 12 +- .../report/report_fp_wo_sticker.xml | 140 +++++++++++++---- .../report/report_fp_work_order.xml | 4 +- 30 files changed, 712 insertions(+), 183 deletions(-) create mode 100644 fusion_plating/fusion_plating_portal/views/fp_sale_order_portal.xml create mode 100644 fusion_plating/fusion_plating_quality/static/src/js/contract_review_redirect.js diff --git a/fusion_plating/docs/superpowers/specs/2026-05-17-portal-dashboard-redesign-design.md b/fusion_plating/docs/superpowers/specs/2026-05-17-portal-dashboard-redesign-design.md index 1b3d47a2..d6d211b5 100644 --- a/fusion_plating/docs/superpowers/specs/2026-05-17-portal-dashboard-redesign-design.md +++ b/fusion_plating/docs/superpowers/specs/2026-05-17-portal-dashboard-redesign-design.md @@ -267,10 +267,10 @@ Each phase bumps the patch version (19.0.3.0.0 → .1.0 → .2.0 → .3.0 → .4 These are flagged as assumptions to confirm against the live model, not blockers: -1. **Stage timestamp sources** — the 5 stages on `fp.portal.job` may not all have explicit timestamp fields. Confirm: do we need to add fields, or pull from the underlying `fp.job` / chatter? If fields are missing, add them as `Datetime` on `fp.portal.job` with `compute=` from the underlying records. +1. **Stage timestamp sources** — RESOLVED 2026-05-17 Phase 3 investigation: `fp.portal.job` is intentionally decoupled from `fp.job` (no `job_id` link). Existing Date fields cover received/shipped only; the 3 middle stages had no timestamps. Decision: **Option B** — added per-stage `Datetime` fields (`received_at`, `in_progress_started_at`, `qc_started_at`, `ready_to_ship_at`, `shipped_at`) with a `write()` override that snapshots `fields.Datetime.now()` on state change. Idempotent — won't overwrite if already set. 2. **Operator name surfacing** — customers seeing operator names is a privacy / policy question. Default in the spec is to show first-initial + last-name (e.g., "D. Mendez"). Confirm with EN Plating before shipping. 3. **Stage-notes copy** — the example notes in the mockup ("Tank 4 · 45 min cycle · Day 3 of 7") are made up. Confirm what info is reasonable to share with the customer per stage. -4. **Document linking edge cases** — what shows when there are 0 documents in a category? Spec assumes a "Will appear when…" placeholder card per the approved mockup. Verify EN Plating doesn't want the placeholder hidden entirely when empty. +4. **Document linking edge cases** — RESOLVED 2026-05-17: `fp.portal.job` has no link to `sale.order` / `quote_request` / `part_catalog`, so V1 cannot reach PO / Drawing / Spec documents through the portal job alone. Decision: **Option C for V1** — surface only the directly-attached fields (`coc_attachment_id`, `packing_list_attachment_id`); render the From-You / Specifications / Quality (when CoC missing) / Shipping (when packing missing) groups as placeholder rows ("Will appear when ..." messaging per the approved mockup). V2 (separate change) will add `sale_order_id` Many2one to `fp.portal.job` and pull PO/drawing/spec docs via that link. 5. **Dark mode** — explicitly deferred. If a customer logs in with `color_scheme=dark` set, what should they see? Default Bootstrap dark fallback is ugly. Suggest: force the portal to `color_scheme=light` for `share=True` users, or add a `prefers-color-scheme: light` meta tag. Document the choice during Phase 1. --- diff --git a/fusion_plating/fusion_plating/__manifest__.py b/fusion_plating/fusion_plating/__manifest__.py index a72b3d29..d5c1064a 100644 --- a/fusion_plating/fusion_plating/__manifest__.py +++ b/fusion_plating/fusion_plating/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'Fusion Plating', - 'version': '19.0.20.0.0', + 'version': '19.0.20.1.0', 'category': 'Manufacturing/Plating', 'summary': 'Core plating / metal finishing ERP: facilities, processes, tanks, baths, jobs, operators.', 'description': """ diff --git a/fusion_plating/fusion_plating/models/fp_process_node.py b/fusion_plating/fusion_plating/models/fp_process_node.py index cd4627dc..cc7d7905 100644 --- a/fusion_plating/fusion_plating/models/fp_process_node.py +++ b/fusion_plating/fusion_plating/models/fp_process_node.py @@ -33,6 +33,11 @@ class FpProcessNode(models.Model): _parent_name = 'parent_id' _order = 'parent_path, sequence, id' _rec_name = 'display_name' + # Search by both name and code in m2o autocomplete pickers (e.g. the + # Process / Recipe field on the direct-order wizard line). Without + # this, typing the recipe code (e.g. "ENP-STEEL-BASIC") didn't match + # because display_name composes from `name` alone for recipe roots. + _rec_names_search = ['name', 'code'] # ---- Identity & hierarchy ------------------------------------------------ diff --git a/fusion_plating/fusion_plating_certificates/__manifest__.py b/fusion_plating/fusion_plating_certificates/__manifest__.py index 908d6d1a..2e775aa4 100644 --- a/fusion_plating/fusion_plating_certificates/__manifest__.py +++ b/fusion_plating/fusion_plating_certificates/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'Fusion Plating — Certificates', - 'version': '19.0.6.0.0', + 'version': '19.0.6.1.0', 'category': 'Manufacturing/Plating', 'summary': 'Certificate registry for CoC, thickness reports, and quality documents.', 'description': """ diff --git a/fusion_plating/fusion_plating_certificates/models/res_config_settings.py b/fusion_plating/fusion_plating_certificates/models/res_config_settings.py index 781a21ff..f9466571 100644 --- a/fusion_plating/fusion_plating_certificates/models/res_config_settings.py +++ b/fusion_plating/fusion_plating_certificates/models/res_config_settings.py @@ -15,9 +15,10 @@ class ResConfigSettings(models.TransientModel): x_fc_owner_user_id = fields.Many2one( related='company_id.x_fc_owner_user_id', readonly=False, ) - x_fc_coc_signature_override = fields.Binary( - related='company_id.x_fc_coc_signature_override', readonly=False, - ) + # x_fc_coc_signature_override was retired 2026-05-17 — cert + # signatures now come from the certifier user's Plating Signature + # only. Field stays on res.company (no migration) but is no longer + # exposed in settings. x_fc_nadcap_logo = fields.Binary( related='company_id.x_fc_nadcap_logo', readonly=False, ) diff --git a/fusion_plating/fusion_plating_certificates/views/res_config_settings_views.xml b/fusion_plating/fusion_plating_certificates/views/res_config_settings_views.xml index f4d4a6f4..ea57248c 100644 --- a/fusion_plating/fusion_plating_certificates/views/res_config_settings_views.xml +++ b/fusion_plating/fusion_plating_certificates/views/res_config_settings_views.xml @@ -22,12 +22,14 @@ - - - + 0 + 300 @@ -47,6 +48,14 @@ reads (so `_so or ...` doesn't NameError). We then override the ones we have data for. --> + + + @@ -54,13 +63,13 @@ - - - - - - - + + + + + + + - + the first linked SO line. Multi-line PO blanks it + since each line has its own description. --> + diff --git a/fusion_plating/fusion_plating_jobs/report/report_fp_job_wo_detail.xml b/fusion_plating/fusion_plating_jobs/report/report_fp_job_wo_detail.xml index 6d510974..25004c48 100644 --- a/fusion_plating/fusion_plating_jobs/report/report_fp_job_wo_detail.xml +++ b/fusion_plating/fusion_plating_jobs/report/report_fp_job_wo_detail.xml @@ -114,7 +114,7 @@