Files
Odoo-Modules/fusion_plating/fusion_plating_quality/__manifest__.py
gsinghpal c118b7c6b5 feat(plating): close compliance gaps 7-9 — NCR + CAPA + discharge + invoice ref
**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>
2026-04-19 10:35:27 -04:00

99 lines
3.5 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.1.2.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',
'mail',
],
'data': [
'security/fp_quality_security.xml',
'security/ir.model.access.csv',
'data/fp_sequence_data.xml',
'data/fp_quality_hold_sequence_data.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/fp_menu.xml',
],
'demo': [
'data/fp_demo_quality_data.xml',
],
'assets': {
'web.assets_backend': [
'fusion_plating_quality/static/src/scss/fusion_plating_quality.scss',
],
},
'installable': True,
'application': False,
'auto_install': False,
}