**7a. NCR close gate** (fusion.plating.ncr.action_close) Block close unless these are filled in: • Description (what happened) • Containment Actions (immediate response) • Root Cause (why it happened) • Disposition (use-as-is / rework / scrap / RTV decision) A closed NCR without these is useless for AS9100 audits — it's the entire point of an NCR to document what went wrong, why, and how we responded. Empty-HTML strings like "<p><br></p>" are detected as empty too. **7b. CAPA close gate** (fusion.plating.capa.action_close) Block close unless: • Root Cause Analysis filled in • Action Plan filled in • Verification (date + verifier) recorded • Effectiveness Notes filled when CAPA was marked Not Effective AS9100 §10.2 / Nadcap require evidence of root-cause analysis, the corrective/preventive action plan, AND that effectiveness was verified before the loop is closed. **8. Invoice ref defensive default** (account.move.create) Auto-fills `ref` from the source SO's client_order_ref or x_fc_po_number when the invoice is created with invoice_origin set but no ref. Already populated on the SO confirm path; this catches manually-created invoices that would otherwise miss it. Customer AP teams reject invoices that don't quote their PO# back. **9. Discharge sample close gate** (fusion.plating.discharge.sample.action_close) Block close unless: • Lab Report # set • Results Received Date set • At least one parameter reading on file • Lab certificate/report attached Without lab evidence the record fails any environmental compliance audit — the whole point is to document the test was performed and what the lab said. **Simulator** (scripts/fp_e2e_workforce.py) Adds 4 new negative tests (Test 8-11), all wrapped in savepoints: ✓ Test 8 : NCR close without RC/containment/disposition → blocked ✓ Test 9 : CAPA close without analysis/plan/verification → blocked ✓ Test 10: Discharge sample close without lab evidence → blocked ✓ Test 11: Invoice ref auto-fills from SO.client_order_ref → asserted **Final E2E**: 52 PASS / 2 WARN / 0 FAIL out of 54 checks. Both remaining WARNs are expected (bake-window auto-create, first-piece gate — coating-driven, this coating doesn't trigger them). 11 negative tests in total now, every gate fires when triggered. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
47 lines
1.7 KiB
Python
47 lines
1.7 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Copyright 2026 Nexa Systems Inc.
|
|
# License OPL-1 (Odoo Proprietary License v1.0)
|
|
{
|
|
'name': 'Fusion Plating - Compliance (Framework)',
|
|
'version': '19.0.1.1.0',
|
|
'category': 'Manufacturing/Plating',
|
|
'summary': 'Jurisdiction-agnostic compliance framework: permits, discharge monitoring, waste manifests, pollutant inventory, compliance calendar, spill register.',
|
|
'description': 'Generic compliance framework. Region packs load jurisdiction-specific data.',
|
|
'author': 'Nexa Systems Inc.',
|
|
'website': 'https://www.nexasystems.ca',
|
|
'license': 'OPL-1',
|
|
'price': 0.00,
|
|
'currency': 'CAD',
|
|
'depends': ['fusion_plating'],
|
|
'data': [
|
|
'security/fp_compliance_security.xml',
|
|
'security/ir.model.access.csv',
|
|
'data/fp_sequence_data.xml',
|
|
'data/fp_jurisdiction_data.xml',
|
|
'data/fp_regulator_data.xml',
|
|
'views/fp_jurisdiction_views.xml',
|
|
'views/fp_regulator_views.xml',
|
|
'views/fp_permit_views.xml',
|
|
'views/fp_discharge_limit_views.xml',
|
|
'views/fp_discharge_sample_views.xml',
|
|
'views/fp_waste_stream_views.xml',
|
|
'views/fp_waste_manifest_views.xml',
|
|
'views/fp_pollutant_inventory_views.xml',
|
|
'views/fp_compliance_event_views.xml',
|
|
'views/fp_spill_register_views.xml',
|
|
'views/fp_facility_views.xml',
|
|
'views/fp_menu.xml',
|
|
],
|
|
'demo': [
|
|
'data/fp_demo_compliance_data.xml',
|
|
],
|
|
'assets': {
|
|
'web.assets_backend': [
|
|
'fusion_plating_compliance/static/src/scss/fusion_plating_compliance.scss',
|
|
],
|
|
},
|
|
'installable': True,
|
|
'application': False,
|
|
'auto_install': False,
|
|
}
|