Two bugs fixed in one drop, both targeting the contract review (QA-005)
enforcement gap reported on entech.
## Bug 1 — WO step routed to wrong wizard
Symptom: clicking Finish & Next or Record on a Contract Review step in
WH/JOB/00339 opened the generic measurement wizard with three fake
prompts (Reviewer Initials / Date Reviewed / QA-005 Approved). No path
to the actual QA-005 form from the work order.
Root cause: action_finish_and_advance + action_open_input_wizard had no
branch for recipe_node.default_kind == 'contract_review'. The step.kind
mapping collapses contract_review -> 'other' so kind-based detection
wouldn't have worked either; gate has to live at the recipe-node layer.
Fix in fusion_plating_jobs/models/fp_job_step.py (v19.0.8.14.6):
- action_finish_and_advance:329 calls _fp_contract_review_redirect
before the input-wizard branch
- action_open_input_wizard:844 same gate, keeps Record button consistent
- _fp_contract_review_redirect:866 (new) returns the part's
action_start_contract_review() unless review.state in
(complete, dismissed) — gate clears so the step can finish after
the operator signs QA-005.
## Bug 2 — Part create did not enforce contract review
Symptom: spec called for a banner-only UX. User wanted true automatic
enforcement on first part creation under an enforced customer.
Fix in fusion_plating_quality/models/fp_part_catalog.py (v19.0.4.10.0):
- @api.model_create_multi def create() override
- _fp_enforce_contract_review_on_create() helper auto-stages the
fp.contract.review record AND surfaces three prominent reminders:
1. Sticky bus.bus warning toast (top-right, doesn't auto-dismiss)
2. mail.activity (To Do) on the part for the current user
3. Smart button on the part form lights up (review now exists)
- Idempotent: skips parts that already carry a review id
- Soft-fails: bus or activity outage doesn't block part creation
- create()-only — write/update flows never re-trigger
Sub 4's existing info banner stays as a fourth surface.
## Tests
- fusion_plating_jobs/tests/test_fp_job_extensions.py:
+TestContractReviewStepRouting (5 tests covering both routing methods,
the complete/dismissed gate-clear, and non-CR step regression)
- fusion_plating_quality/tests/test_part_catalog_contract_review_enforcement.py
(NEW): 9 tests covering auto-create, batch create, idempotency,
activity surface, bus surface, write-must-not-retrigger, soft-fail.
- docs/superpowers/tests/2026-04-22-sub4-smoke.py: flipped the
"no review yet" assertion to "review auto-created" to match new
behavior. Sign-flow assertions unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
131 lines
5.3 KiB
Python
131 lines
5.3 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Copyright 2026 Nexa Systems Inc.
|
|
# License OPL-1 (Odoo Proprietary License v1.0)
|
|
# Part of the Fusion Plating product family.
|
|
|
|
{
|
|
'name': 'Fusion Plating — Quality (QMS)',
|
|
'version': '19.0.4.10.0',
|
|
'category': 'Manufacturing/Plating',
|
|
'summary': 'Native QMS for plating shops: NCR, CAPA, calibration, AVL, FAIR, '
|
|
'internal audits, customer specs, document control. CE + EE compatible.',
|
|
'description': """
|
|
Fusion Plating — Quality (QMS)
|
|
==============================
|
|
|
|
Part of the Fusion Plating product family by Nexa Systems Inc.
|
|
|
|
A complete, native Quality Management System layer for the Fusion Plating
|
|
core. Built to satisfy the paperwork side of running a plating / metal
|
|
finishing shop without forcing customers onto Odoo Enterprise or paid
|
|
add-ons.
|
|
|
|
This module is intentionally Community Edition compatible. It does NOT
|
|
depend on `quality`, `quality_control`, `documents`, or `sign`. Everything
|
|
is built natively on `mail.thread`, `mail.activity.mixin`, and standard
|
|
Odoo records.
|
|
|
|
Records included
|
|
----------------
|
|
* Non-Conformance Reports (NCR) — containment, disposition, MRB workflow
|
|
* Corrective & Preventive Actions (CAPA) — root cause, action plan,
|
|
effectiveness verification, NCR linkage
|
|
* Calibration Equipment register + individual calibration events with
|
|
pass / limited / fail and impact assessment
|
|
* Approved Vendor List (AVL) — supplier approval state, expiry,
|
|
scorecard rating
|
|
* Customer Specification library — industry, customer, and internal
|
|
specs (e.g. AMS 2404, ASTM B733, MIL-C-26074)
|
|
* Internal Audits — internal, customer, certification, supplier scope
|
|
* First Article Inspection Reports (FAIR) — per part / revision / customer
|
|
* Document Control — procedures, work instructions, forms, standards,
|
|
manuals with revision tracking and trained-user lists
|
|
|
|
Integration
|
|
-----------
|
|
* Reuses the core res.groups.privilege ACLs from fusion_plating
|
|
(operator, supervisor, manager, admin) — no new groups to manage
|
|
* Linked to facilities, baths, and process types from core
|
|
* Chatter on every record for full audit trail
|
|
* Sequence-numbered references for NCR, CAPA, FAIR, audits
|
|
|
|
Theme aware
|
|
-----------
|
|
SCSS uses Bootstrap CSS variables and color-mix() so cards, badges, and
|
|
overdue indicators render correctly in both light and dark mode without
|
|
any media-query overrides.
|
|
|
|
Copyright (c) 2026 Nexa Systems Inc. All rights reserved.
|
|
""",
|
|
'author': 'Nexa Systems Inc.',
|
|
'website': 'https://www.nexasystems.ca',
|
|
'maintainer': 'Nexa Systems Inc.',
|
|
'support': 'support@nexasystems.ca',
|
|
'license': 'OPL-1',
|
|
'price': 0.00,
|
|
'currency': 'CAD',
|
|
'depends': [
|
|
'fusion_plating',
|
|
'fusion_plating_configurator',
|
|
'fusion_plating_certificates', # fp.thickness.reading link from QC
|
|
'fusion_plating_shopfloor', # _fp_shopfloor_tokens.scss for QC tablet
|
|
'fusion_plating_receiving', # rma_id on fp.receiving (Sub 12 Phase A)
|
|
# NB: deliberately NOT depending on fusion_plating_jobs — it depends
|
|
# on us already (extends fusion.plating.quality.hold). Many2one('fp.job')
|
|
# on fp.rma is resolved by the registry once jobs loads after us.
|
|
'mail',
|
|
],
|
|
'data': [
|
|
'security/fp_quality_security.xml',
|
|
'security/ir.model.access.csv',
|
|
'data/fp_sequence_data.xml',
|
|
'data/fp_quality_hold_sequence_data.xml',
|
|
'data/fp_rma_sequence.xml',
|
|
'data/fp_quality_categorisation_data.xml',
|
|
'data/fp_qc_data.xml',
|
|
'views/fp_qc_template_views.xml',
|
|
'views/fp_quality_hold_views.xml',
|
|
'views/fp_ncr_views.xml',
|
|
'views/fp_capa_views.xml',
|
|
'views/fp_calibration_views.xml',
|
|
'views/fp_avl_views.xml',
|
|
'views/fp_customer_spec_views.xml',
|
|
'views/fp_audit_views.xml',
|
|
'views/fp_fair_views.xml',
|
|
'views/fp_doc_control_views.xml',
|
|
'views/res_partner_views.xml',
|
|
'views/res_partner_qc_views.xml',
|
|
'views/res_config_settings_views.xml',
|
|
'views/fp_contract_review_views.xml',
|
|
'views/fp_part_catalog_views.xml',
|
|
'views/fp_quality_check_views.xml',
|
|
'views/fp_rma_views.xml',
|
|
'views/fp_quality_categorisation_views.xml',
|
|
'views/fp_quality_point_views.xml',
|
|
'views/fp_quality_smart_button_views.xml',
|
|
'views/fp_quality_dashboard_views.xml',
|
|
'reports/fp_contract_review_report.xml',
|
|
'reports/fp_contract_review_template.xml',
|
|
'views/fp_menu.xml',
|
|
],
|
|
'demo': [
|
|
'data/fp_demo_quality_data.xml',
|
|
],
|
|
'assets': {
|
|
'web.assets_backend': [
|
|
'fusion_plating_quality/static/src/scss/fusion_plating_quality.scss',
|
|
# Phase 2 (Sub 11) — QC tablet OWL relocated from bridge_mrp.
|
|
'fusion_plating_quality/static/src/scss/fp_qc_checklist.scss',
|
|
'fusion_plating_quality/static/src/xml/fp_qc_checklist.xml',
|
|
'fusion_plating_quality/static/src/js/fp_qc_checklist.js',
|
|
# Sub 12 Phase D — Unified Quality Dashboard.
|
|
'fusion_plating_quality/static/src/scss/fp_quality_dashboard.scss',
|
|
'fusion_plating_quality/static/src/xml/fp_quality_dashboard.xml',
|
|
'fusion_plating_quality/static/src/js/fp_quality_dashboard.js',
|
|
],
|
|
},
|
|
'installable': True,
|
|
'application': False,
|
|
'auto_install': False,
|
|
}
|