Phase 1 — Backend QC gate (bridge_mrp)
* fp.qc.checklist.template / .line — per-customer checklist definitions
* fusion.plating.quality.check / .line — per-MO instances walked by inspectors
* res.partner.x_fc_requires_qc + x_fc_qc_template_id toggles policy per customer
* mrp.production.button_mark_done blocks close until QC passes (plus optional
thickness-readings + thickness-PDF gates on aerospace templates)
* Auto-spawns the QC on MO confirm from the customer's resolved template
* Fischerscope XDAL 600 PDF parser auto-extracts NiP / Ni% / P% readings on upload
* fp.thickness.reading gains quality_check_id + auto_extracted
Phase 2 — Mobile QC checklist (OWL client action)
* fp_qc_checklist registered under registry.category("actions")
* Reuses shopfloor design tokens (_fp_shopfloor_tokens.scss) — 48 px touch
targets, shadow-based elevation, three-tier contrast, light + dark bundles
* Per-line pass/fail/N/A with numeric value range, mandatory photo, notes
* Fischerscope PDF drop-zone → server-side pdftotext parse
* Sign-off bar with pass / fail / rework actions
Phase 3 — Admin config
* Starter global default + aerospace/Nadcap templates seeded
* Plating → Configuration → QC Checklist Templates (manager-only)
* Plating → Quality → Quality Checks menu
* "Plating Documents" tab on res.partner gains the QC toggle + template picker
* MO form smart button opens the active QC in the mobile checklist
Gap fixes
* Scanner handles FP-QC:<ref> and FP-MO:<name> — launches the checklist
directly on the tablet
* action_spawn_retry clones a fresh QC from a failed one so rework doesn't
need a new MO
All 12 models / routes / gates smoke + E2E tested: 24 assertions pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
27 lines
1006 B
Python
27 lines
1006 B
Python
# -*- coding: utf-8 -*-
|
|
# Copyright 2026 Nexa Systems Inc.
|
|
# License OPL-1 (Odoo Proprietary License v1.0)
|
|
# Part of the Fusion Plating product family.
|
|
"""Per-customer QC policy — does this customer require quality control
|
|
sign-off on every job, and which checklist template governs the checks?
|
|
"""
|
|
from odoo import fields, models
|
|
|
|
|
|
class ResPartner(models.Model):
|
|
_inherit = 'res.partner'
|
|
|
|
x_fc_requires_qc = fields.Boolean(
|
|
string='Require QC Sign-off',
|
|
default=False, tracking=True,
|
|
help='When enabled, a job for this customer cannot be marked '
|
|
'complete until a QC inspector has signed off on the '
|
|
'quality checklist.',
|
|
)
|
|
x_fc_qc_template_id = fields.Many2one(
|
|
'fp.qc.checklist.template', string='QC Checklist Template',
|
|
help='Override the auto-resolved template for this customer. '
|
|
'Leave blank to use any active customer-specific template, '
|
|
'falling back to the global default.',
|
|
)
|