folder rename

This commit is contained in:
gsinghpal
2026-04-16 20:53:53 -04:00
parent 3f3ddcbab4
commit 7c7ef06057
634 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from . import models

View File

@@ -0,0 +1,98 @@
# -*- 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.0.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,
}

View File

@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc. — DEMO DATA (temporary)
Remove this file and its manifest entry before production release.
-->
<odoo noupdate="1">
<!-- ========== NCRs ========== -->
<record id="demo_ncr_001" model="fusion.plating.ncr">
<field name="name">NCR-2026-001</field>
<field name="facility_id" ref="fusion_plating.demo_facility_main"/>
<field name="bath_id" ref="fusion_plating.demo_bath_en_mp"/>
<field name="state">containment</field>
<field name="source">inspection</field>
<field name="severity">high</field>
<field name="part_ref">P/N 4422-B — Hydraulic Cylinder Rod</field>
<field name="reported_date" eval="(DateTime.today() - timedelta(days=5)).strftime('%Y-%m-%d %H:%M:%S')"/>
<field name="description" type="html"><p>EN deposit thickness below spec on OD of part. Spec calls for 0.0005" ± 0.0001", measured 0.0003" average across 4 readings. Bath temperature was at low end of range (185°F vs 188°F target). Possible root cause: heater element degradation.</p></field>
<field name="quantity_affected">12</field>
</record>
<record id="demo_ncr_002" model="fusion.plating.ncr">
<field name="name">NCR-2026-002</field>
<field name="facility_id" ref="fusion_plating.demo_facility_main"/>
<field name="bath_id" ref="fusion_plating.demo_bath_cr_hard"/>
<field name="state">open</field>
<field name="source">customer</field>
<field name="severity">critical</field>
<field name="part_ref">P/N 7810-A — Landing Gear Pin</field>
<field name="reported_date" eval="(DateTime.today() - timedelta(days=2)).strftime('%Y-%m-%d %H:%M:%S')"/>
<field name="description" type="html"><p>Customer reported micro-cracking on hard chrome deposit. Parts returned for investigation. Lot of 6 pins from WO-2026-0412. Immediate containment: quarantine remaining stock from same bath run.</p></field>
<field name="quantity_affected">6</field>
</record>
<record id="demo_ncr_003" model="fusion.plating.ncr">
<field name="name">NCR-2026-003</field>
<field name="facility_id" ref="fusion_plating.demo_facility_east"/>
<field name="state">closed</field>
<field name="source">shop_floor</field>
<field name="severity">low</field>
<field name="part_ref">P/N 1133-C — Bracket Assembly</field>
<field name="reported_date" eval="(DateTime.today() - timedelta(days=30)).strftime('%Y-%m-%d %H:%M:%S')"/>
<field name="closed_date" eval="(DateTime.today() - timedelta(days=20)).strftime('%Y-%m-%d %H:%M:%S')"/>
<field name="description" type="html"><p>Minor cosmetic discolouration on black oxide finish. Traced to elevated bath temperature (147°C vs 141°C target). Thermostat recalibrated. Parts accepted by customer with concession.</p></field>
<field name="root_cause" type="html"><p>Thermostat drift on BOX-01 tank heater. Last calibration was 14 months ago (overdue).</p></field>
<field name="containment" type="html"><p>Segregated affected lot. Verified all parts visually. 4 of 20 showed discolouration — reworked.</p></field>
<field name="disposition">rework</field>
<field name="quantity_affected">20</field>
</record>
<!-- ========== CAPAs ========== -->
<record id="demo_capa_001" model="fusion.plating.capa">
<field name="name">CAPA-2026-001</field>
<field name="ncr_id" ref="demo_ncr_003"/>
<field name="facility_id" ref="fusion_plating.demo_facility_east"/>
<field name="type">corrective</field>
<field name="state">implementation</field>
<field name="due_date" eval="(DateTime.today() + timedelta(days=15)).strftime('%Y-%m-%d')"/>
<field name="description" type="html"><p>Corrective action for NCR-2026-003: black oxide thermostat drift causing out-of-spec bath temperature.</p></field>
<field name="root_cause_analysis" type="html"><p>Root cause: calibration interval for tank heater thermostats was set to 18 months. Industry best practice for hot-process tanks is 612 months. Maintenance PM schedule did not flag the overdue calibration.</p></field>
<field name="action_plan" type="html"><p>1. Reduce calibration interval for all hot-process thermostats to 6 months.<br/>2. Add calibration due-date alerts to the maintenance dashboard.<br/>3. Retrain maintenance team on calibration SOP revision.<br/>4. Verify all other hot-process tank thermostats within 30 days.</p></field>
</record>
<record id="demo_capa_002" model="fusion.plating.capa">
<field name="name">CAPA-2026-002</field>
<field name="facility_id" ref="fusion_plating.demo_facility_main"/>
<field name="type">preventive</field>
<field name="state">analysis</field>
<field name="due_date" eval="(DateTime.today() + timedelta(days=30)).strftime('%Y-%m-%d')"/>
<field name="description" type="html"><p>Preventive action: implement automated bath temperature alerting across all plating lines to catch thermostat drift before it affects product quality.</p></field>
</record>
<!-- ========== CALIBRATION EQUIPMENT ========== -->
<record id="demo_cal_thickness" model="fusion.plating.calibration.equipment">
<field name="name">XRF Thickness Gauge — Fischer XDL-B</field>
<field name="code">CAL-XRF-01</field>
<field name="facility_id" ref="fusion_plating.demo_facility_main"/>
<field name="equipment_type">xrf</field>
<field name="state">in_service</field>
<field name="calibration_interval_days">365</field>
<field name="last_cal_date" eval="(DateTime.today() - timedelta(days=90)).strftime('%Y-%m-%d')"/>
<field name="next_cal_date" eval="(DateTime.today() + timedelta(days=275)).strftime('%Y-%m-%d')"/>
</record>
<record id="demo_cal_ph" model="fusion.plating.calibration.equipment">
<field name="name">pH Meter — Hanna HI-2020</field>
<field name="code">CAL-PH-01</field>
<field name="facility_id" ref="fusion_plating.demo_facility_main"/>
<field name="equipment_type">ph_meter</field>
<field name="state">in_service</field>
<field name="calibration_interval_days">90</field>
<field name="last_cal_date" eval="(DateTime.today() - timedelta(days=80)).strftime('%Y-%m-%d')"/>
<field name="next_cal_date" eval="(DateTime.today() + timedelta(days=10)).strftime('%Y-%m-%d')"/>
</record>
<record id="demo_cal_temp" model="fusion.plating.calibration.equipment">
<field name="name">Thermocouple Probe — Fluke 52 II</field>
<field name="code">CAL-TC-01</field>
<field name="facility_id" ref="fusion_plating.demo_facility_main"/>
<field name="equipment_type">thermocouple</field>
<field name="state">overdue</field>
<field name="calibration_interval_days">180</field>
<field name="last_cal_date" eval="(DateTime.today() - timedelta(days=200)).strftime('%Y-%m-%d')"/>
<field name="next_cal_date" eval="(DateTime.today() - timedelta(days=15)).strftime('%Y-%m-%d')"/>
</record>
<!-- ========== DOC CONTROL ========== -->
<record id="demo_doc_sop_en" model="fusion.plating.doc.control">
<field name="name">SOP-EN-001 — Electroless Nickel Plating Procedure</field>
<field name="doc_type">procedure</field>
<field name="revision">Rev C</field>
<field name="state">effective</field>
<field name="effective_date" eval="(DateTime.today() - timedelta(days=120)).strftime('%Y-%m-%d')"/>
<field name="review_date" eval="(DateTime.today() + timedelta(days=245)).strftime('%Y-%m-%d')"/>
</record>
<record id="demo_doc_sop_cr" model="fusion.plating.doc.control">
<field name="name">SOP-CR-001 — Hard Chrome Plating Procedure</field>
<field name="doc_type">procedure</field>
<field name="revision">Rev B</field>
<field name="state">effective</field>
<field name="effective_date" eval="(DateTime.today() - timedelta(days=300)).strftime('%Y-%m-%d')"/>
<field name="review_date" eval="(DateTime.today() + timedelta(days=65)).strftime('%Y-%m-%d')"/>
</record>
<record id="demo_doc_qm" model="fusion.plating.doc.control">
<field name="name">QM-001 — Quality Manual</field>
<field name="doc_type">manual</field>
<field name="revision">Rev 5</field>
<field name="state">effective</field>
<field name="effective_date" eval="(DateTime.today() - timedelta(days=60)).strftime('%Y-%m-%d')"/>
<field name="review_date" eval="(DateTime.today() + timedelta(days=305)).strftime('%Y-%m-%d')"/>
</record>
</odoo>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Part of the Fusion Plating product family.
-->
<odoo noupdate="1">
<record id="seq_fp_quality_hold" model="ir.sequence">
<field name="name">Fusion Plating: Quality Hold</field>
<field name="code">fusion.plating.quality.hold</field>
<field name="prefix">HOLD-</field>
<field name="padding">4</field>
<field name="company_id" eval="False"/>
</record>
</odoo>

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Part of the Fusion Plating product family.
-->
<odoo noupdate="1">
<record id="seq_fp_ncr" model="ir.sequence">
<field name="name">Fusion Plating: NCR</field>
<field name="code">fusion.plating.ncr</field>
<field name="prefix">NCR/%(year)s/</field>
<field name="padding">4</field>
<field name="company_id" eval="False"/>
</record>
<record id="seq_fp_capa" model="ir.sequence">
<field name="name">Fusion Plating: CAPA</field>
<field name="code">fusion.plating.capa</field>
<field name="prefix">CAPA/%(year)s/</field>
<field name="padding">4</field>
<field name="company_id" eval="False"/>
</record>
<record id="seq_fp_fair" model="ir.sequence">
<field name="name">Fusion Plating: FAIR</field>
<field name="code">fusion.plating.fair</field>
<field name="prefix">FAIR/%(year)s/</field>
<field name="padding">4</field>
<field name="company_id" eval="False"/>
</record>
<record id="seq_fp_audit" model="ir.sequence">
<field name="name">Fusion Plating: Audit</field>
<field name="code">fusion.plating.audit</field>
<field name="prefix">AUDIT/%(year)s/</field>
<field name="padding">3</field>
<field name="company_id" eval="False"/>
</record>
</odoo>

View File

@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from . import fp_ncr
from . import fp_capa
from . import fp_calibration
from . import fp_calibration_event
from . import fp_avl
from . import fp_customer_spec
from . import fp_audit
from . import fp_fair
from . import fp_doc_control
from . import fp_quality_hold

View File

@@ -0,0 +1,121 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from odoo import api, fields, models
class FpAudit(models.Model):
"""Internal, customer, certification, or supplier audit.
Holds the planning, execution, and findings for any audit the shop
is involved in. Findings drive CAPAs through the optional many-to-many
relationship.
"""
_name = 'fusion.plating.audit'
_description = 'Fusion Plating — Audit'
_inherit = ['mail.thread', 'mail.activity.mixin']
_order = 'audit_date desc, id desc'
name = fields.Char(
string='Reference',
required=True,
copy=False,
readonly=True,
default=lambda self: self._default_name(),
tracking=True,
)
audit_type = fields.Selection(
[
('internal', 'Internal'),
('customer', 'Customer'),
('certification', 'Certification Body'),
('supplier', 'Supplier'),
],
string='Type',
default='internal',
required=True,
tracking=True,
)
scope = fields.Char(
string='Scope',
tracking=True,
)
facility_id = fields.Many2one(
'fusion.plating.facility',
string='Facility',
tracking=True,
)
company_id = fields.Many2one(
'res.company',
related='facility_id.company_id',
store=True,
readonly=True,
)
auditor_ids = fields.Many2many(
'res.users',
'fp_audit_auditor_rel',
'audit_id',
'user_id',
string='Auditors',
)
audit_date = fields.Date(
string='Audit Date',
tracking=True,
)
state = fields.Selection(
[
('planned', 'Planned'),
('in_progress', 'In Progress'),
('findings', 'Findings'),
('closed', 'Closed'),
],
string='Status',
default='planned',
required=True,
tracking=True,
)
findings_count = fields.Integer(
string='# Findings',
)
findings_html = fields.Html(
string='Findings',
)
capa_ids = fields.Many2many(
'fusion.plating.capa',
'fp_audit_capa_rel',
'audit_id',
'capa_id',
string='CAPAs',
)
capa_count = fields.Integer(
compute='_compute_capa_count',
)
active = fields.Boolean(default=True)
@api.model
def _default_name(self):
seq = self.env['ir.sequence'].next_by_code('fusion.plating.audit')
return seq or '/'
@api.model_create_multi
def create(self, vals_list):
for vals in vals_list:
if not vals.get('name') or vals.get('name') == '/':
vals['name'] = self._default_name()
return super().create(vals_list)
@api.depends('capa_ids')
def _compute_capa_count(self):
for rec in self:
rec.capa_count = len(rec.capa_ids)
def action_start(self):
self.write({'state': 'in_progress'})
def action_findings(self):
self.write({'state': 'findings'})
def action_close(self):
self.write({'state': 'closed'})

View File

@@ -0,0 +1,124 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from odoo import api, fields, models
class FpAvl(models.Model):
"""Approved Vendor List entry.
The AVL ties an approval state to a res.partner. Each entry tracks
approval date, expiry, scorecard rating, and what processes the
vendor is approved to supply for. Suspended or removed vendors stay
in the list for traceability.
"""
_name = 'fusion.plating.avl'
_description = 'Fusion Plating — Approved Vendor List'
_inherit = ['mail.thread', 'mail.activity.mixin']
_order = 'state, name'
_rec_name = 'name'
name = fields.Char(
string='Vendor',
compute='_compute_name',
store=True,
)
partner_id = fields.Many2one(
'res.partner',
string='Partner',
required=True,
tracking=True,
)
company_id = fields.Many2one(
'res.company',
string='Company',
default=lambda self: self.env.company,
)
category = fields.Selection(
[
('chemical', 'Chemical'),
('equipment', 'Equipment'),
('service', 'Service'),
('lab', 'Lab / Calibration'),
('shipping', 'Shipping'),
('other', 'Other'),
],
string='Category',
default='chemical',
tracking=True,
)
approval_date = fields.Date(
string='Approval Date',
tracking=True,
)
approval_expiry = fields.Date(
string='Approval Expiry',
tracking=True,
)
state = fields.Selection(
[
('pending', 'Pending'),
('approved', 'Approved'),
('conditional', 'Conditional'),
('suspended', 'Suspended'),
('removed', 'Removed'),
],
string='Status',
default='pending',
required=True,
tracking=True,
)
approved_for = fields.Char(
string='Approved For',
help='Free text — what processes / products / services this vendor '
'is approved to supply.',
)
notes = fields.Html(
string='Notes',
)
scorecard_rating = fields.Float(
string='Scorecard',
help='0 to 5 rating from the most recent vendor scorecard.',
)
is_expired = fields.Boolean(
string='Expired',
compute='_compute_is_expired',
search='_search_is_expired',
)
active = fields.Boolean(default=True)
@api.depends('partner_id')
def _compute_name(self):
for rec in self:
rec.name = rec.partner_id.name or 'New Vendor'
@api.depends('approval_expiry')
def _compute_is_expired(self):
today = fields.Date.context_today(self)
for rec in self:
rec.is_expired = bool(
rec.approval_expiry and rec.approval_expiry < today
)
def _search_is_expired(self, operator, value):
today = fields.Date.context_today(self)
if (operator == '=' and value) or (operator == '!=' and not value):
return [('approval_expiry', '<', today)]
return ['|', ('approval_expiry', '>=', today), ('approval_expiry', '=', False)]
def action_approve(self):
self.write({
'state': 'approved',
'approval_date': fields.Date.context_today(self),
})
def action_suspend(self):
self.write({'state': 'suspended'})
def action_remove(self):
self.write({'state': 'removed'})
def action_reinstate(self):
self.write({'state': 'approved'})

View File

@@ -0,0 +1,171 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from datetime import timedelta
from odoo import api, fields, models
class FpCalibrationEquipment(models.Model):
"""Equipment master for the calibration register.
Holds the metadata about each measuring instrument the shop owns:
type, NIST traceability, calibration interval, and computed
next-due date. Individual events live on
fusion.plating.calibration.event.
"""
_name = 'fusion.plating.calibration.equipment'
_description = 'Fusion Plating — Calibrated Equipment'
_inherit = ['mail.thread', 'mail.activity.mixin']
_order = 'next_cal_date asc, name'
name = fields.Char(
string='Equipment',
required=True,
tracking=True,
)
code = fields.Char(
string='Asset Code',
required=True,
tracking=True,
)
equipment_type = fields.Selection(
[
('xrf', 'XRF Analyzer'),
('ph_meter', 'pH Meter'),
('thermocouple', 'Thermocouple'),
('balance', 'Balance / Scale'),
('timer', 'Timer'),
('thickness_gauge', 'Thickness Gauge'),
('multimeter', 'Multimeter'),
('other', 'Other'),
],
string='Type',
default='other',
tracking=True,
)
facility_id = fields.Many2one(
'fusion.plating.facility',
string='Facility',
tracking=True,
)
company_id = fields.Many2one(
'res.company',
related='facility_id.company_id',
store=True,
readonly=True,
)
nist_traceable = fields.Boolean(
string='NIST Traceable',
default=True,
)
calibration_interval_days = fields.Integer(
string='Interval (days)',
default=365,
help='Number of days between calibrations.',
)
last_cal_date = fields.Date(
string='Last Calibration',
compute='_compute_cal_dates',
store=True,
)
next_cal_date = fields.Date(
string='Next Calibration',
compute='_compute_cal_dates',
store=True,
)
state = fields.Selection(
[
('in_service', 'In Service'),
('due_soon', 'Due Soon'),
('overdue', 'Overdue'),
('out_of_service', 'Out of Service'),
],
string='Status',
compute='_compute_state',
store=True,
tracking=True,
)
manual_state = fields.Selection(
[
('in_service', 'In Service'),
('out_of_service', 'Out of Service'),
],
string='Manual Override',
default='in_service',
help='Use this to mark a unit out-of-service even if it is not yet '
'overdue (e.g. damaged in transit).',
tracking=True,
)
active = fields.Boolean(default=True)
event_ids = fields.One2many(
'fusion.plating.calibration.event',
'equipment_id',
string='Calibration Events',
)
event_count = fields.Integer(
compute='_compute_event_count',
)
_sql_constraints = [
(
'fp_cal_equipment_code_uniq',
'unique(code, company_id)',
'Asset code must be unique per company.',
),
]
@api.depends('event_ids', 'event_ids.cal_date', 'calibration_interval_days')
def _compute_cal_dates(self):
for rec in self:
last_event = rec.event_ids.sorted('cal_date', reverse=True)[:1]
rec.last_cal_date = last_event.cal_date if last_event else False
if rec.last_cal_date and rec.calibration_interval_days:
rec.next_cal_date = rec.last_cal_date + timedelta(
days=rec.calibration_interval_days
)
else:
rec.next_cal_date = False
@api.depends('next_cal_date', 'manual_state')
def _compute_state(self):
today = fields.Date.context_today(self)
for rec in self:
if rec.manual_state == 'out_of_service':
rec.state = 'out_of_service'
continue
if not rec.next_cal_date:
rec.state = 'in_service'
continue
days_left = (rec.next_cal_date - today).days
if days_left < 0:
rec.state = 'overdue'
elif days_left <= 14:
rec.state = 'due_soon'
else:
rec.state = 'in_service'
@api.depends('event_ids')
def _compute_event_count(self):
for rec in self:
rec.event_count = len(rec.event_ids)
def action_mark_out_of_service(self):
self.write({'manual_state': 'out_of_service'})
def action_return_to_service(self):
self.write({'manual_state': 'in_service'})
def action_view_events(self):
self.ensure_one()
return {
'name': 'Calibration Events',
'type': 'ir.actions.act_window',
'res_model': 'fusion.plating.calibration.event',
'view_mode': 'list,form',
'domain': [('equipment_id', '=', self.id)],
'context': {'default_equipment_id': self.id},
}

View File

@@ -0,0 +1,93 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from odoo import api, fields, models
class FpCalibrationEvent(models.Model):
"""A single calibration event against a piece of equipment.
Captures who calibrated it, the result (pass / limited / fail), the
as-found and as-left readings, and the certificate reference. A failed
calibration carries an impact_assessment field so the QM can document
which jobs may have been measured by an out-of-tolerance instrument.
"""
_name = 'fusion.plating.calibration.event'
_description = 'Fusion Plating — Calibration Event'
_inherit = ['mail.thread', 'mail.activity.mixin']
_order = 'cal_date desc, id desc'
_rec_name = 'display_name'
equipment_id = fields.Many2one(
'fusion.plating.calibration.equipment',
string='Equipment',
required=True,
ondelete='cascade',
tracking=True,
)
display_name = fields.Char(
compute='_compute_display_name',
store=True,
)
cal_date = fields.Date(
string='Calibration Date',
required=True,
default=lambda self: fields.Date.context_today(self),
tracking=True,
)
performed_by_id = fields.Many2one(
'res.users',
string='Performed By',
default=lambda self: self.env.user,
tracking=True,
)
performed_by_external = fields.Char(
string='External Calibration House',
help='If calibrated by an outside lab, name them here.',
)
result = fields.Selection(
[
('pass', 'Pass'),
('limited', 'Pass with Limitations'),
('fail', 'Fail'),
],
string='Result',
required=True,
default='pass',
tracking=True,
)
as_found_notes = fields.Text(
string='As-Found Readings',
)
as_left_notes = fields.Text(
string='As-Left Readings',
)
certificate_ref = fields.Char(
string='Certificate #',
)
impact_assessment = fields.Html(
string='Impact Assessment',
help='If the result is Fail or Limited, document which jobs / parts '
'were measured by this instrument since the last calibration.',
)
facility_id = fields.Many2one(
related='equipment_id.facility_id',
store=True,
readonly=True,
)
company_id = fields.Many2one(
'res.company',
related='equipment_id.company_id',
store=True,
readonly=True,
)
@api.depends('equipment_id.code', 'cal_date')
def _compute_display_name(self):
for rec in self:
if rec.equipment_id and rec.cal_date:
rec.display_name = f'{rec.equipment_id.code}{rec.cal_date}'
else:
rec.display_name = 'Calibration Event'

View File

@@ -0,0 +1,166 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from odoo import api, fields, models
class FpCapa(models.Model):
"""Corrective and Preventive Action.
A CAPA carries an issue from "we found a problem" all the way to
"we proved the fix worked". Each CAPA has an owner, a due date, an
action plan, and an effectiveness verification step.
"""
_name = 'fusion.plating.capa'
_description = 'Fusion Plating — Corrective / Preventive Action'
_inherit = ['mail.thread', 'mail.activity.mixin']
_order = 'due_date asc, id desc'
name = fields.Char(
string='Reference',
required=True,
copy=False,
readonly=True,
default=lambda self: self._default_name(),
tracking=True,
)
state = fields.Selection(
[
('draft', 'Draft'),
('analysis', 'Analysis'),
('implementation', 'Implementation'),
('verification', 'Verification'),
('effective', 'Effective'),
('not_effective', 'Not Effective'),
('closed', 'Closed'),
],
string='Status',
default='draft',
required=True,
tracking=True,
)
type = fields.Selection(
[
('corrective', 'Corrective'),
('preventive', 'Preventive'),
],
string='Type',
default='corrective',
required=True,
tracking=True,
)
ncr_id = fields.Many2one(
'fusion.plating.ncr',
string='Source NCR',
ondelete='set null',
tracking=True,
)
facility_id = fields.Many2one(
'fusion.plating.facility',
string='Facility',
related='ncr_id.facility_id',
store=True,
readonly=False,
)
company_id = fields.Many2one(
'res.company',
related='facility_id.company_id',
store=True,
readonly=True,
)
description = fields.Html(string='Description')
root_cause_analysis = fields.Html(
string='Root Cause Analysis',
help='Use 5 Whys, fishbone, or any structured method.',
)
action_plan = fields.Html(string='Action Plan')
owner_id = fields.Many2one(
'res.users',
string='Owner',
required=True,
default=lambda self: self.env.user,
tracking=True,
)
due_date = fields.Date(string='Due Date', tracking=True)
verification_date = fields.Date(string='Verification Date', tracking=True)
verification_by_id = fields.Many2one(
'res.users',
string='Verified By',
tracking=True,
)
is_effective = fields.Boolean(string='Effective', tracking=True)
effectiveness_notes = fields.Html(string='Effectiveness Notes')
is_overdue = fields.Boolean(
string='Overdue',
compute='_compute_is_overdue',
search='_search_is_overdue',
)
active = fields.Boolean(default=True)
@api.model
def _default_name(self):
seq = self.env['ir.sequence'].next_by_code('fusion.plating.capa')
return seq or '/'
@api.model_create_multi
def create(self, vals_list):
for vals in vals_list:
if not vals.get('name') or vals.get('name') == '/':
vals['name'] = self._default_name()
return super().create(vals_list)
@api.depends('due_date', 'state')
def _compute_is_overdue(self):
today = fields.Date.context_today(self)
for rec in self:
rec.is_overdue = bool(
rec.due_date
and rec.state not in ('effective', 'closed')
and rec.due_date < today
)
def _search_is_overdue(self, operator, value):
today = fields.Date.context_today(self)
if (operator == '=' and value) or (operator == '!=' and not value):
return [
('due_date', '<', today),
('state', 'not in', ['effective', 'closed']),
]
return [
'|',
('due_date', '>=', today),
('state', 'in', ['effective', 'closed']),
]
def action_start_analysis(self):
self.write({'state': 'analysis'})
def action_start_implementation(self):
self.write({'state': 'implementation'})
def action_start_verification(self):
self.write({'state': 'verification'})
def action_mark_effective(self):
self.write({
'state': 'effective',
'is_effective': True,
'verification_date': fields.Date.context_today(self),
'verification_by_id': self.env.user.id,
})
def action_mark_not_effective(self):
self.write({
'state': 'not_effective',
'is_effective': False,
'verification_date': fields.Date.context_today(self),
'verification_by_id': self.env.user.id,
})
def action_close(self):
self.write({'state': 'closed'})
def action_reset_to_draft(self):
self.write({'state': 'draft'})

View File

@@ -0,0 +1,99 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from odoo import fields, models
class FpCustomerSpec(models.Model):
"""Customer specification library entry.
Holds the metadata about a specification (industry, customer, or
internal) so jobs and process types can reference it. The actual
document lives at document_url — could be a SharePoint link, a
Google Drive URL, or any other location the shop already uses.
"""
_name = 'fusion.plating.customer.spec'
_description = 'Fusion Plating — Customer Specification'
_inherit = ['mail.thread', 'mail.activity.mixin']
_order = 'spec_type, code, revision desc'
_rec_name = 'display_name'
name = fields.Char(
string='Title',
required=True,
tracking=True,
)
display_name = fields.Char(
compute='_compute_display_name',
store=True,
)
code = fields.Char(
string='Spec Code',
required=True,
tracking=True,
help='e.g. AMS 2404, ASTM B733, MIL-C-26074',
)
revision = fields.Char(
string='Revision',
tracking=True,
)
effective_date = fields.Date(
string='Effective Date',
tracking=True,
)
partner_id = fields.Many2one(
'res.partner',
string='Customer',
help='Leave blank for industry / internal specs.',
)
process_type_ids = fields.Many2many(
'fusion.plating.process.type',
'fp_customer_spec_process_rel',
'spec_id',
'process_type_id',
string='Applicable Processes',
)
spec_type = fields.Selection(
[
('industry', 'Industry / Standard'),
('customer', 'Customer'),
('internal', 'Internal'),
],
string='Type',
default='industry',
required=True,
tracking=True,
)
document_url = fields.Char(
string='Document URL',
help='Link to the controlled copy of the specification (SharePoint, '
'Google Drive, etc.).',
)
notes = fields.Html(
string='Notes',
)
company_id = fields.Many2one(
'res.company',
string='Company',
default=lambda self: self.env.company,
)
active = fields.Boolean(default=True)
_sql_constraints = [
(
'fp_customer_spec_code_rev_uniq',
'unique(code, revision, company_id)',
'A specification at the same revision must be unique per company.',
),
]
def _compute_display_name(self):
for rec in self:
parts = [rec.code or '']
if rec.revision:
parts.append(f'Rev {rec.revision}')
if rec.name:
parts.append(f'{rec.name}')
rec.display_name = ' '.join(p for p in parts if p)

View File

@@ -0,0 +1,110 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from odoo import fields, models
class FpDocControl(models.Model):
"""Controlled document register.
Lightweight document control without depending on the Enterprise
`documents` or `sign` modules. Each entry tracks the document name,
revision, owner, lifecycle state, and the list of operators trained
on this revision (a common audit ask).
"""
_name = 'fusion.plating.doc.control'
_description = 'Fusion Plating — Controlled Document'
_inherit = ['mail.thread', 'mail.activity.mixin']
_order = 'doc_type, name, revision desc'
name = fields.Char(
string='Title',
required=True,
tracking=True,
)
doc_type = fields.Selection(
[
('procedure', 'Procedure'),
('work_instruction', 'Work Instruction'),
('form', 'Form'),
('standard', 'Standard'),
('manual', 'Manual'),
],
string='Type',
default='procedure',
required=True,
tracking=True,
)
revision = fields.Char(
string='Revision',
required=True,
tracking=True,
)
effective_date = fields.Date(
string='Effective Date',
tracking=True,
)
review_date = fields.Date(
string='Next Review',
tracking=True,
)
owner_id = fields.Many2one(
'res.users',
string='Owner',
default=lambda self: self.env.user,
tracking=True,
)
state = fields.Selection(
[
('draft', 'Draft'),
('in_review', 'In Review'),
('approved', 'Approved'),
('effective', 'Effective'),
('obsolete', 'Obsolete'),
],
string='Status',
default='draft',
required=True,
tracking=True,
)
attachment_ids = fields.Many2many(
'ir.attachment',
'fp_doc_control_attachment_rel',
'doc_id',
'attachment_id',
string='Attachments',
)
trained_user_ids = fields.Many2many(
'res.users',
'fp_doc_control_trained_rel',
'doc_id',
'user_id',
string='Trained Users',
help='Operators who have been trained on this revision of the document.',
)
company_id = fields.Many2one(
'res.company',
string='Company',
default=lambda self: self.env.company,
)
active = fields.Boolean(default=True)
def action_submit_for_review(self):
self.write({'state': 'in_review'})
def action_approve(self):
self.write({'state': 'approved'})
def action_make_effective(self):
self.write({
'state': 'effective',
'effective_date': fields.Date.context_today(self),
})
def action_mark_obsolete(self):
self.write({'state': 'obsolete'})
def action_reset_to_draft(self):
self.write({'state': 'draft'})

View File

@@ -0,0 +1,116 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from odoo import api, fields, models
class FpFair(models.Model):
"""First Article Inspection Report (FAIR).
Captures the documented first-article inspection for a part at a
specific revision. Used heavily in aerospace and automotive: every
new part number, every revision change, every customer-mandated
PPAP needs a FAIR on file.
"""
_name = 'fusion.plating.fair'
_description = 'Fusion Plating — First Article Inspection Report'
_inherit = ['mail.thread', 'mail.activity.mixin']
_order = 'performed_date desc, id desc'
name = fields.Char(
string='Reference',
required=True,
copy=False,
readonly=True,
default=lambda self: self._default_name(),
tracking=True,
)
part_number = fields.Char(
string='Part Number',
required=True,
tracking=True,
)
part_revision = fields.Char(
string='Part Revision',
tracking=True,
)
customer_id = fields.Many2one(
'res.partner',
string='Customer',
tracking=True,
)
process_type_ids = fields.Many2many(
'fusion.plating.process.type',
'fp_fair_process_rel',
'fair_id',
'process_type_id',
string='Processes',
)
performed_date = fields.Date(
string='Inspection Date',
default=lambda self: fields.Date.context_today(self),
tracking=True,
)
performed_by_id = fields.Many2one(
'res.users',
string='Inspector',
default=lambda self: self.env.user,
tracking=True,
)
result = fields.Selection(
[
('pass', 'Pass'),
('fail', 'Fail'),
('conditional', 'Conditional'),
],
string='Result',
default='pass',
tracking=True,
)
state = fields.Selection(
[
('draft', 'Draft'),
('in_review', 'In Review'),
('approved', 'Approved'),
('rejected', 'Rejected'),
],
string='Status',
default='draft',
required=True,
tracking=True,
)
notes = fields.Html(
string='Notes',
)
company_id = fields.Many2one(
'res.company',
string='Company',
default=lambda self: self.env.company,
)
active = fields.Boolean(default=True)
@api.model
def _default_name(self):
seq = self.env['ir.sequence'].next_by_code('fusion.plating.fair')
return seq or '/'
@api.model_create_multi
def create(self, vals_list):
for vals in vals_list:
if not vals.get('name') or vals.get('name') == '/':
vals['name'] = self._default_name()
return super().create(vals_list)
def action_submit_for_review(self):
self.write({'state': 'in_review'})
def action_approve(self):
self.write({'state': 'approved'})
def action_reject(self):
self.write({'state': 'rejected'})
def action_reset_to_draft(self):
self.write({'state': 'draft'})

View File

@@ -0,0 +1,176 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from odoo import api, fields, models
class FpNcr(models.Model):
"""Non-Conformance Report.
The NCR is the entry point of the Fusion Plating QMS. Anything that
falls outside of spec — a chemistry deviation, a customer return, an
inspection failure, an audit observation — is opened as an NCR and
walked through containment, disposition, and closure.
"""
_name = 'fusion.plating.ncr'
_description = 'Fusion Plating — Non-Conformance Report'
_inherit = ['mail.thread', 'mail.activity.mixin']
_order = 'reported_date desc, id desc'
name = fields.Char(
string='Reference',
required=True,
copy=False,
readonly=True,
default=lambda self: self._default_name(),
tracking=True,
)
state = fields.Selection(
[
('draft', 'Draft'),
('open', 'Open'),
('containment', 'Containment'),
('disposition', 'Disposition'),
('closed', 'Closed'),
],
string='Status',
default='draft',
required=True,
tracking=True,
)
facility_id = fields.Many2one(
'fusion.plating.facility',
string='Facility',
required=True,
tracking=True,
)
company_id = fields.Many2one(
'res.company',
related='facility_id.company_id',
store=True,
readonly=True,
)
reported_by_id = fields.Many2one(
'res.users',
string='Reported By',
default=lambda self: self.env.user,
tracking=True,
)
reported_date = fields.Datetime(
string='Reported On',
default=lambda self: fields.Datetime.now(),
tracking=True,
)
closed_date = fields.Datetime(
string='Closed On',
readonly=True,
tracking=True,
)
source = fields.Selection(
[
('shop_floor', 'Shop Floor'),
('inspection', 'Inspection'),
('customer', 'Customer'),
('audit', 'Audit'),
('supplier', 'Supplier'),
('other', 'Other'),
],
string='Source',
default='shop_floor',
tracking=True,
)
severity = fields.Selection(
[
('low', 'Low'),
('medium', 'Medium'),
('high', 'High'),
('critical', 'Critical'),
],
string='Severity',
default='medium',
tracking=True,
)
part_ref = fields.Char(string='Part / Lot')
quantity_affected = fields.Float(string='Quantity Affected')
description = fields.Html(string='Description')
root_cause = fields.Html(string='Root Cause')
containment = fields.Html(string='Containment Actions')
disposition = fields.Selection(
[
('use_as_is', 'Use as Is'),
('rework', 'Rework'),
('scrap', 'Scrap'),
('return_to_customer', 'Return to Customer'),
('pending', 'Pending'),
],
string='Disposition',
default='pending',
tracking=True,
)
bath_id = fields.Many2one(
'fusion.plating.bath',
string='Bath',
help='If the non-conformance was caused by a specific chemistry bath.',
)
customer_partner_id = fields.Many2one(
'res.partner',
string='Customer',
)
capa_ids = fields.One2many(
'fusion.plating.capa',
'ncr_id',
string='CAPAs',
)
capa_count = fields.Integer(
string='# CAPAs',
compute='_compute_capa_count',
)
active = fields.Boolean(default=True)
@api.model
def _default_name(self):
seq = self.env['ir.sequence'].next_by_code('fusion.plating.ncr')
return seq or '/'
@api.model_create_multi
def create(self, vals_list):
for vals in vals_list:
if not vals.get('name') or vals.get('name') == '/':
vals['name'] = self._default_name()
return super().create(vals_list)
@api.depends('capa_ids')
def _compute_capa_count(self):
for rec in self:
rec.capa_count = len(rec.capa_ids)
def action_open(self):
self.write({'state': 'open'})
def action_containment(self):
self.write({'state': 'containment'})
def action_disposition(self):
self.write({'state': 'disposition'})
def action_close(self):
self.write({
'state': 'closed',
'closed_date': fields.Datetime.now(),
})
def action_reset_to_draft(self):
self.write({'state': 'draft', 'closed_date': False})
def action_view_capas(self):
self.ensure_one()
return {
'name': 'CAPAs',
'type': 'ir.actions.act_window',
'res_model': 'fusion.plating.capa',
'view_mode': 'list,form',
'domain': [('ncr_id', '=', self.id)],
'context': {'default_ncr_id': self.id},
}

View File

@@ -0,0 +1,184 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
# License OPL-1 (Odoo Proprietary License v1.0)
# Part of the Fusion Plating product family.
from odoo import api, fields, models
class FpQualityHold(models.Model):
"""Quality Hold — parts pulled from production for quality review.
Enables the Steelhead-style "Move Parts Into Quality Management"
workflow. An operator can split a partial quantity off a job and
place it on hold for inspection, rework, or scrap.
"""
_name = 'fusion.plating.quality.hold'
_description = 'Fusion Plating — Quality Hold'
_inherit = ['mail.thread', 'mail.activity.mixin']
_order = 'create_date desc'
name = fields.Char(
string='Reference',
required=True,
copy=False,
readonly=True,
default=lambda self: self._default_name(),
tracking=True,
)
# ----- What's on hold -----
# NOTE: workorder_id, production_id, and portal_job_id live in
# fusion_plating_bridge_mrp (which depends on mrp and
# fusion_plating_portal). Keeping them here would force hard
# dependencies and break minimal CE-only installs.
part_ref = fields.Char(string='Part Number')
# ----- Hold details -----
qty_on_hold = fields.Integer(string='Qty on Hold', required=True)
qty_original = fields.Integer(string='Original Qty')
mark_for_scrap = fields.Boolean(string='Mark for Scrap', default=False)
hold_reason = fields.Selection(
[
('damaged', 'Parts Damaged'),
('out_of_spec', 'Out of Specification'),
('contamination', 'Contamination'),
('customer_complaint', 'Customer Complaint'),
('process_deviation', 'Process Deviation'),
('other', 'Other'),
],
string='Hold Reason',
default='other',
tracking=True,
)
description = fields.Text(string='Description')
attachment_ids = fields.Many2many(
'ir.attachment',
string='Attachments',
)
# ----- Location / station context -----
facility_id = fields.Many2one(
'fusion.plating.facility',
string='Facility',
)
work_center_id = fields.Many2one(
'fusion.plating.work.center',
string='Station',
)
current_process_node = fields.Char(string='Current Process Node')
# ----- Status -----
state = fields.Selection(
[
('on_hold', 'On Hold'),
('under_review', 'Under Review'),
('released', 'Released to Production'),
('scrapped', 'Scrapped'),
('reworked', 'Sent to Rework'),
],
string='Status',
default='on_hold',
required=True,
tracking=True,
)
# ----- Resolution -----
ncr_id = fields.Many2one('fusion.plating.ncr', string='Linked NCR')
resolved_by_id = fields.Many2one('res.users', string='Resolved By')
resolution_date = fields.Datetime(string='Resolution Date')
resolution_notes = fields.Text(string='Resolution Notes')
# ----- Housekeeping -----
operator_id = fields.Many2one(
'res.users',
string='Held By',
default=lambda self: self.env.user,
)
company_id = fields.Many2one(
'res.company',
default=lambda self: self.env.company,
)
active = fields.Boolean(default=True)
# ------------------------------------------------------------------
# Defaults / create
# ------------------------------------------------------------------
@api.model
def _default_name(self):
seq = self.env['ir.sequence'].next_by_code(
'fusion.plating.quality.hold',
)
return seq or '/'
@api.model_create_multi
def create(self, vals_list):
for vals in vals_list:
if not vals.get('name') or vals.get('name') == '/':
vals['name'] = self._default_name()
return super().create(vals_list)
# ------------------------------------------------------------------
# Actions
# ------------------------------------------------------------------
def action_start_review(self):
self.write({'state': 'under_review'})
self._post_state_message('Under Review')
def action_release(self):
self.write({
'state': 'released',
'resolved_by_id': self.env.user.id,
'resolution_date': fields.Datetime.now(),
})
self._post_state_message('Released to Production')
def action_scrap(self):
self.write({
'state': 'scrapped',
'mark_for_scrap': True,
'resolved_by_id': self.env.user.id,
'resolution_date': fields.Datetime.now(),
})
self._post_state_message('Scrapped')
def action_send_to_rework(self):
self.write({
'state': 'reworked',
'resolved_by_id': self.env.user.id,
'resolution_date': fields.Datetime.now(),
})
self._post_state_message('Sent to Rework')
def action_create_ncr(self):
"""Create a linked NCR from this hold record."""
self.ensure_one()
ncr = self.env['fusion.plating.ncr'].create({
'facility_id': self.facility_id.id,
'source': 'shop_floor',
'severity': 'medium',
'part_ref': self.part_ref,
'quantity_affected': self.qty_on_hold,
'description': self.description or '',
})
self.write({'ncr_id': ncr.id})
self._post_state_message(f'NCR {ncr.name} created')
return {
'name': 'NCR',
'type': 'ir.actions.act_window',
'res_model': 'fusion.plating.ncr',
'res_id': ncr.id,
'view_mode': 'form',
'target': 'current',
}
# ------------------------------------------------------------------
# Helpers
# ------------------------------------------------------------------
def _post_state_message(self, label):
for rec in self:
rec.message_post(
body=f"Hold status changed to <b>{label}</b>.",
message_type='comment',
subtype_xmlid='mail.mt_note',
)

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Part of the Fusion Plating product family.
-->
<odoo>
<!--
This module reuses the core groups from fusion_plating:
fusion_plating.group_fusion_plating_operator
fusion_plating.group_fusion_plating_supervisor
fusion_plating.group_fusion_plating_manager
fusion_plating.group_fusion_plating_admin
No new res.groups records are introduced here. All access control
is expressed in security/ir.model.access.csv via those existing
groups, so a single user role works across the core and the QMS.
-->
</odoo>

View File

@@ -0,0 +1,31 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_fp_ncr_operator,fp.ncr.operator,model_fusion_plating_ncr,fusion_plating.group_fusion_plating_operator,1,0,0,0
access_fp_ncr_supervisor,fp.ncr.supervisor,model_fusion_plating_ncr,fusion_plating.group_fusion_plating_supervisor,1,1,1,0
access_fp_ncr_manager,fp.ncr.manager,model_fusion_plating_ncr,fusion_plating.group_fusion_plating_manager,1,1,1,1
access_fp_capa_operator,fp.capa.operator,model_fusion_plating_capa,fusion_plating.group_fusion_plating_operator,1,0,0,0
access_fp_capa_supervisor,fp.capa.supervisor,model_fusion_plating_capa,fusion_plating.group_fusion_plating_supervisor,1,1,1,0
access_fp_capa_manager,fp.capa.manager,model_fusion_plating_capa,fusion_plating.group_fusion_plating_manager,1,1,1,1
access_fp_cal_equipment_operator,fp.cal.equipment.operator,model_fusion_plating_calibration_equipment,fusion_plating.group_fusion_plating_operator,1,0,0,0
access_fp_cal_equipment_supervisor,fp.cal.equipment.supervisor,model_fusion_plating_calibration_equipment,fusion_plating.group_fusion_plating_supervisor,1,1,1,0
access_fp_cal_equipment_manager,fp.cal.equipment.manager,model_fusion_plating_calibration_equipment,fusion_plating.group_fusion_plating_manager,1,1,1,1
access_fp_cal_event_operator,fp.cal.event.operator,model_fusion_plating_calibration_event,fusion_plating.group_fusion_plating_operator,1,0,0,0
access_fp_cal_event_supervisor,fp.cal.event.supervisor,model_fusion_plating_calibration_event,fusion_plating.group_fusion_plating_supervisor,1,1,1,0
access_fp_cal_event_manager,fp.cal.event.manager,model_fusion_plating_calibration_event,fusion_plating.group_fusion_plating_manager,1,1,1,1
access_fp_avl_operator,fp.avl.operator,model_fusion_plating_avl,fusion_plating.group_fusion_plating_operator,1,0,0,0
access_fp_avl_supervisor,fp.avl.supervisor,model_fusion_plating_avl,fusion_plating.group_fusion_plating_supervisor,1,1,1,0
access_fp_avl_manager,fp.avl.manager,model_fusion_plating_avl,fusion_plating.group_fusion_plating_manager,1,1,1,1
access_fp_customer_spec_operator,fp.customer.spec.operator,model_fusion_plating_customer_spec,fusion_plating.group_fusion_plating_operator,1,0,0,0
access_fp_customer_spec_supervisor,fp.customer.spec.supervisor,model_fusion_plating_customer_spec,fusion_plating.group_fusion_plating_supervisor,1,1,1,0
access_fp_customer_spec_manager,fp.customer.spec.manager,model_fusion_plating_customer_spec,fusion_plating.group_fusion_plating_manager,1,1,1,1
access_fp_audit_operator,fp.audit.operator,model_fusion_plating_audit,fusion_plating.group_fusion_plating_operator,1,0,0,0
access_fp_audit_supervisor,fp.audit.supervisor,model_fusion_plating_audit,fusion_plating.group_fusion_plating_supervisor,1,1,1,0
access_fp_audit_manager,fp.audit.manager,model_fusion_plating_audit,fusion_plating.group_fusion_plating_manager,1,1,1,1
access_fp_fair_operator,fp.fair.operator,model_fusion_plating_fair,fusion_plating.group_fusion_plating_operator,1,0,0,0
access_fp_fair_supervisor,fp.fair.supervisor,model_fusion_plating_fair,fusion_plating.group_fusion_plating_supervisor,1,1,1,0
access_fp_fair_manager,fp.fair.manager,model_fusion_plating_fair,fusion_plating.group_fusion_plating_manager,1,1,1,1
access_fp_doc_control_operator,fp.doc.control.operator,model_fusion_plating_doc_control,fusion_plating.group_fusion_plating_operator,1,0,0,0
access_fp_doc_control_supervisor,fp.doc.control.supervisor,model_fusion_plating_doc_control,fusion_plating.group_fusion_plating_supervisor,1,1,1,0
access_fp_doc_control_manager,fp.doc.control.manager,model_fusion_plating_doc_control,fusion_plating.group_fusion_plating_manager,1,1,1,1
access_fp_quality_hold_operator,fp.quality.hold.operator,model_fusion_plating_quality_hold,fusion_plating.group_fusion_plating_operator,1,0,1,0
access_fp_quality_hold_supervisor,fp.quality.hold.supervisor,model_fusion_plating_quality_hold,fusion_plating.group_fusion_plating_supervisor,1,1,1,0
access_fp_quality_hold_manager,fp.quality.hold.manager,model_fusion_plating_quality_hold,fusion_plating.group_fusion_plating_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_fp_ncr_operator fp.ncr.operator model_fusion_plating_ncr fusion_plating.group_fusion_plating_operator 1 0 0 0
3 access_fp_ncr_supervisor fp.ncr.supervisor model_fusion_plating_ncr fusion_plating.group_fusion_plating_supervisor 1 1 1 0
4 access_fp_ncr_manager fp.ncr.manager model_fusion_plating_ncr fusion_plating.group_fusion_plating_manager 1 1 1 1
5 access_fp_capa_operator fp.capa.operator model_fusion_plating_capa fusion_plating.group_fusion_plating_operator 1 0 0 0
6 access_fp_capa_supervisor fp.capa.supervisor model_fusion_plating_capa fusion_plating.group_fusion_plating_supervisor 1 1 1 0
7 access_fp_capa_manager fp.capa.manager model_fusion_plating_capa fusion_plating.group_fusion_plating_manager 1 1 1 1
8 access_fp_cal_equipment_operator fp.cal.equipment.operator model_fusion_plating_calibration_equipment fusion_plating.group_fusion_plating_operator 1 0 0 0
9 access_fp_cal_equipment_supervisor fp.cal.equipment.supervisor model_fusion_plating_calibration_equipment fusion_plating.group_fusion_plating_supervisor 1 1 1 0
10 access_fp_cal_equipment_manager fp.cal.equipment.manager model_fusion_plating_calibration_equipment fusion_plating.group_fusion_plating_manager 1 1 1 1
11 access_fp_cal_event_operator fp.cal.event.operator model_fusion_plating_calibration_event fusion_plating.group_fusion_plating_operator 1 0 0 0
12 access_fp_cal_event_supervisor fp.cal.event.supervisor model_fusion_plating_calibration_event fusion_plating.group_fusion_plating_supervisor 1 1 1 0
13 access_fp_cal_event_manager fp.cal.event.manager model_fusion_plating_calibration_event fusion_plating.group_fusion_plating_manager 1 1 1 1
14 access_fp_avl_operator fp.avl.operator model_fusion_plating_avl fusion_plating.group_fusion_plating_operator 1 0 0 0
15 access_fp_avl_supervisor fp.avl.supervisor model_fusion_plating_avl fusion_plating.group_fusion_plating_supervisor 1 1 1 0
16 access_fp_avl_manager fp.avl.manager model_fusion_plating_avl fusion_plating.group_fusion_plating_manager 1 1 1 1
17 access_fp_customer_spec_operator fp.customer.spec.operator model_fusion_plating_customer_spec fusion_plating.group_fusion_plating_operator 1 0 0 0
18 access_fp_customer_spec_supervisor fp.customer.spec.supervisor model_fusion_plating_customer_spec fusion_plating.group_fusion_plating_supervisor 1 1 1 0
19 access_fp_customer_spec_manager fp.customer.spec.manager model_fusion_plating_customer_spec fusion_plating.group_fusion_plating_manager 1 1 1 1
20 access_fp_audit_operator fp.audit.operator model_fusion_plating_audit fusion_plating.group_fusion_plating_operator 1 0 0 0
21 access_fp_audit_supervisor fp.audit.supervisor model_fusion_plating_audit fusion_plating.group_fusion_plating_supervisor 1 1 1 0
22 access_fp_audit_manager fp.audit.manager model_fusion_plating_audit fusion_plating.group_fusion_plating_manager 1 1 1 1
23 access_fp_fair_operator fp.fair.operator model_fusion_plating_fair fusion_plating.group_fusion_plating_operator 1 0 0 0
24 access_fp_fair_supervisor fp.fair.supervisor model_fusion_plating_fair fusion_plating.group_fusion_plating_supervisor 1 1 1 0
25 access_fp_fair_manager fp.fair.manager model_fusion_plating_fair fusion_plating.group_fusion_plating_manager 1 1 1 1
26 access_fp_doc_control_operator fp.doc.control.operator model_fusion_plating_doc_control fusion_plating.group_fusion_plating_operator 1 0 0 0
27 access_fp_doc_control_supervisor fp.doc.control.supervisor model_fusion_plating_doc_control fusion_plating.group_fusion_plating_supervisor 1 1 1 0
28 access_fp_doc_control_manager fp.doc.control.manager model_fusion_plating_doc_control fusion_plating.group_fusion_plating_manager 1 1 1 1
29 access_fp_quality_hold_operator fp.quality.hold.operator model_fusion_plating_quality_hold fusion_plating.group_fusion_plating_operator 1 0 1 0
30 access_fp_quality_hold_supervisor fp.quality.hold.supervisor model_fusion_plating_quality_hold fusion_plating.group_fusion_plating_supervisor 1 1 1 0
31 access_fp_quality_hold_manager fp.quality.hold.manager model_fusion_plating_quality_hold fusion_plating.group_fusion_plating_manager 1 1 1 1

View File

@@ -0,0 +1,145 @@
// =============================================================================
// Fusion Plating — Quality (QMS) backend styles
// Copyright 2026 Nexa Systems Inc.
// License OPL-1 (Odoo Proprietary License v1.0)
//
// THEME AWARENESS
// ---------------
// This file NEVER hardcodes backgrounds or text colours. All surface and
// semantic colours come from Odoo / Bootstrap CSS custom properties so the
// component renders correctly in BOTH light and dark mode without any
// duplication or media-query overrides.
//
// background: var(--bs-body-bg) // main surface
// surface: var(--o-view-background-color) // view canvas
// foreground: var(--bs-body-color) // main text
// muted text: var(--bs-secondary-color)
// border: var(--bs-border-color)
// primary: var(--o-action) // Odoo action / brand
// success: var(--bs-success)
// warning: var(--bs-warning)
// danger: var(--bs-danger)
// info: var(--bs-info)
//
// Semantic status tints use `color-mix()` against the Bootstrap theme tokens
// so a danger badge is darker on light mode and brighter on dark mode
// automatically — one rule, two looks.
//
// We never target `.o_dark`, `html.dark`, or `@media (prefers-color-scheme)`.
// =============================================================================
// -----------------------------------------------------------------------------
// Local helper — semantic tint mixin
// -----------------------------------------------------------------------------
@mixin fp-quality-tint($color-var, $amount: 12%) {
background-color: color-mix(in srgb, var(#{$color-var}) #{$amount}, transparent);
color: var(#{$color-var});
border: 1px solid color-mix(in srgb, var(#{$color-var}) 35%, transparent);
}
// -----------------------------------------------------------------------------
// Universal overdue indicator — used across CAPAs, calibration, and AVL
// -----------------------------------------------------------------------------
.o_fp_overdue {
display: inline-block;
padding: 1px 8px;
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.04em;
border-radius: 999px;
@include fp-quality-tint(--bs-danger, 14%);
}
// -----------------------------------------------------------------------------
// NCR kanban — severity tint on the left border
// -----------------------------------------------------------------------------
.o_fp_ncr_kanban {
.o_fp_ncr_card {
border-left-width: 4px;
border-left-color: var(--bs-info, var(--o-action));
&[data-severity="low"] {
border-left-color: var(--bs-info, var(--o-action));
}
&[data-severity="medium"] {
border-left-color: color-mix(in srgb, var(--bs-warning) 70%, var(--bs-border-color));
}
&[data-severity="high"] {
border-left-color: var(--bs-warning);
}
&[data-severity="critical"] {
border-left-color: var(--bs-danger);
}
}
.o_fp_severity_pill {
padding: 2px 8px;
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.03em;
border-radius: 999px;
&[data-severity="low"] { @include fp-quality-tint(--bs-info); }
&[data-severity="medium"] { @include fp-quality-tint(--bs-secondary-color); }
&[data-severity="high"] { @include fp-quality-tint(--bs-warning); }
&[data-severity="critical"] { @include fp-quality-tint(--bs-danger); }
}
}
// -----------------------------------------------------------------------------
// CAPA kanban — overdue tint, type pill
// -----------------------------------------------------------------------------
.o_fp_capa_kanban {
.o_fp_capa_card {
border-left-width: 4px;
border-left-color: var(--bs-success);
&[data-overdue="true"] {
border-left-color: var(--bs-danger);
background-color: color-mix(
in srgb,
var(--bs-danger) 5%,
var(--o-view-background-color, var(--bs-body-bg))
);
}
}
.o_fp_capa_type {
padding: 2px 8px;
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.03em;
border-radius: 999px;
&[data-type="corrective"] { @include fp-quality-tint(--bs-warning); }
&[data-type="preventive"] { @include fp-quality-tint(--bs-info); }
}
}
// -----------------------------------------------------------------------------
// FAIR card — result tint
// -----------------------------------------------------------------------------
.o_fp_fair_card {
border-left-width: 4px;
border-left-color: var(--bs-secondary-color);
&[data-result="pass"] {
border-left-color: var(--bs-success);
}
&[data-result="conditional"] {
border-left-color: var(--bs-warning);
}
&[data-result="fail"] {
border-left-color: var(--bs-danger);
}
}

View File

@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Part of the Fusion Plating product family.
-->
<odoo>
<record id="view_fp_audit_list" model="ir.ui.view">
<field name="name">fp.audit.list</field>
<field name="model">fusion.plating.audit</field>
<field name="arch" type="xml">
<list string="Audits"
decoration-muted="state == 'closed'"
decoration-warning="state == 'findings'">
<field name="name"/>
<field name="audit_type"/>
<field name="scope"/>
<field name="facility_id" groups="base.group_multi_company"/>
<field name="audit_date"/>
<field name="findings_count"/>
<field name="capa_count"/>
<field name="state" widget="badge"
decoration-info="state == 'planned'"
decoration-success="state == 'in_progress'"
decoration-warning="state == 'findings'"
decoration-muted="state == 'closed'"/>
</list>
</field>
</record>
<record id="view_fp_audit_form" model="ir.ui.view">
<field name="name">fp.audit.form</field>
<field name="model">fusion.plating.audit</field>
<field name="arch" type="xml">
<form string="Audit">
<header>
<button name="action_start" string="Start Audit" type="object"
class="oe_highlight" invisible="state != 'planned'"/>
<button name="action_findings" string="Record Findings" type="object"
invisible="state != 'in_progress'"/>
<button name="action_close" string="Close Audit" type="object"
invisible="state not in ('findings','in_progress')"/>
<field name="state" widget="statusbar"
statusbar_visible="planned,in_progress,findings,closed"/>
</header>
<sheet>
<div class="oe_title">
<label for="name"/>
<h1><field name="name" readonly="1"/></h1>
</div>
<group>
<group>
<field name="audit_type"/>
<field name="scope"/>
<field name="facility_id"/>
</group>
<group>
<field name="audit_date"/>
<field name="findings_count"/>
<field name="capa_count" readonly="1"/>
</group>
</group>
<group string="Auditors">
<field name="auditor_ids" widget="many2many_tags" nolabel="1"/>
</group>
<notebook>
<page string="Findings">
<field name="findings_html"/>
</page>
<page string="CAPAs">
<field name="capa_ids">
<list>
<field name="name"/>
<field name="type"/>
<field name="owner_id"/>
<field name="due_date"/>
<field name="state" widget="badge"/>
</list>
</field>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<record id="view_fp_audit_search" model="ir.ui.view">
<field name="name">fp.audit.search</field>
<field name="model">fusion.plating.audit</field>
<field name="arch" type="xml">
<search string="Audits">
<field name="name"/>
<field name="scope"/>
<field name="facility_id"/>
<separator/>
<filter string="Planned" name="planned" domain="[('state','=','planned')]"/>
<filter string="In Progress" name="in_progress" domain="[('state','=','in_progress')]"/>
<filter string="Findings" name="findings" domain="[('state','=','findings')]"/>
<filter string="Closed" name="closed" domain="[('state','=','closed')]"/>
<separator/>
<filter string="Internal" name="internal" domain="[('audit_type','=','internal')]"/>
<filter string="Customer" name="customer" domain="[('audit_type','=','customer')]"/>
<filter string="Certification" name="cert" domain="[('audit_type','=','certification')]"/>
<filter string="Supplier" name="supplier" domain="[('audit_type','=','supplier')]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<group>
<filter string="Status" name="group_state" context="{'group_by':'state'}"/>
<filter string="Type" name="group_type" context="{'group_by':'audit_type'}"/>
<filter string="Facility" name="group_facility" context="{'group_by':'facility_id'}"/>
</group>
</search>
</field>
</record>
<record id="action_fp_audit" model="ir.actions.act_window">
<field name="name">Internal Audits</field>
<field name="res_model">fusion.plating.audit</field>
<field name="view_mode">list,form</field>
<field name="search_view_id" ref="view_fp_audit_search"/>
</record>
</odoo>

View File

@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Part of the Fusion Plating product family.
-->
<odoo>
<record id="view_fp_avl_list" model="ir.ui.view">
<field name="name">fp.avl.list</field>
<field name="model">fusion.plating.avl</field>
<field name="arch" type="xml">
<list string="Approved Vendors"
decoration-success="state == 'approved'"
decoration-info="state == 'pending'"
decoration-warning="state == 'conditional'"
decoration-muted="state in ('suspended','removed')"
decoration-danger="is_expired == True">
<field name="name"/>
<field name="partner_id"/>
<field name="category"/>
<field name="approved_for"/>
<field name="approval_date"/>
<field name="approval_expiry"/>
<field name="is_expired" optional="hide"/>
<field name="scorecard_rating"/>
<field name="state" widget="badge"
decoration-success="state == 'approved'"
decoration-warning="state == 'conditional'"
decoration-muted="state in ('suspended','removed')"/>
</list>
</field>
</record>
<record id="view_fp_avl_form" model="ir.ui.view">
<field name="name">fp.avl.form</field>
<field name="model">fusion.plating.avl</field>
<field name="arch" type="xml">
<form string="Approved Vendor">
<header>
<button name="action_approve" string="Approve" type="object"
class="oe_highlight" invisible="state == 'approved'"/>
<button name="action_suspend" string="Suspend" type="object"
invisible="state in ('suspended','removed')"/>
<button name="action_reinstate" string="Reinstate" type="object"
invisible="state != 'suspended'"/>
<button name="action_remove" string="Remove" type="object"
invisible="state == 'removed'"/>
<field name="state" widget="statusbar"
statusbar_visible="pending,approved,conditional,suspended,removed"/>
</header>
<sheet>
<div class="oe_title">
<label for="partner_id"/>
<h1><field name="partner_id"/></h1>
</div>
<group>
<group>
<field name="category"/>
<field name="approved_for"/>
<field name="scorecard_rating"/>
</group>
<group>
<field name="approval_date"/>
<field name="approval_expiry"/>
<field name="is_expired" readonly="1"/>
</group>
</group>
<notebook>
<page string="Notes">
<field name="notes"/>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<record id="view_fp_avl_search" model="ir.ui.view">
<field name="name">fp.avl.search</field>
<field name="model">fusion.plating.avl</field>
<field name="arch" type="xml">
<search string="AVL">
<field name="name"/>
<field name="partner_id"/>
<field name="approved_for"/>
<separator/>
<filter string="Approved" name="approved" domain="[('state','=','approved')]"/>
<filter string="Pending" name="pending" domain="[('state','=','pending')]"/>
<filter string="Suspended" name="suspended" domain="[('state','=','suspended')]"/>
<filter string="Expired" name="expired" domain="[('is_expired','=',True)]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<group>
<filter string="Status" name="group_state" context="{'group_by':'state'}"/>
<filter string="Category" name="group_category" context="{'group_by':'category'}"/>
</group>
</search>
</field>
</record>
<record id="action_fp_avl" model="ir.actions.act_window">
<field name="name">Approved Vendor List</field>
<field name="res_model">fusion.plating.avl</field>
<field name="view_mode">list,form</field>
<field name="search_view_id" ref="view_fp_avl_search"/>
</record>
</odoo>

View File

@@ -0,0 +1,248 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Part of the Fusion Plating product family.
-->
<odoo>
<!-- ===================== EQUIPMENT ===================== -->
<record id="view_fp_cal_equipment_list" model="ir.ui.view">
<field name="name">fp.cal.equipment.list</field>
<field name="model">fusion.plating.calibration.equipment</field>
<field name="arch" type="xml">
<list string="Calibrated Equipment"
decoration-warning="state == 'due_soon'"
decoration-danger="state == 'overdue'"
decoration-muted="state == 'out_of_service'">
<field name="code"/>
<field name="name"/>
<field name="equipment_type"/>
<field name="facility_id" groups="base.group_multi_company"/>
<field name="nist_traceable" widget="boolean_toggle"/>
<field name="calibration_interval_days"/>
<field name="last_cal_date"/>
<field name="next_cal_date"/>
<field name="state" widget="badge"
decoration-success="state == 'in_service'"
decoration-warning="state == 'due_soon'"
decoration-danger="state == 'overdue'"
decoration-muted="state == 'out_of_service'"/>
</list>
</field>
</record>
<record id="view_fp_cal_equipment_form" model="ir.ui.view">
<field name="name">fp.cal.equipment.form</field>
<field name="model">fusion.plating.calibration.equipment</field>
<field name="arch" type="xml">
<form string="Equipment">
<header>
<button name="action_mark_out_of_service" string="Mark Out of Service" type="object"
invisible="manual_state == 'out_of_service'"/>
<button name="action_return_to_service" string="Return to Service" type="object"
invisible="manual_state == 'in_service'"/>
<field name="state" widget="statusbar"
statusbar_visible="in_service,due_soon,overdue,out_of_service"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="action_view_events" type="object"
class="oe_stat_button" icon="fa-calendar-check-o">
<field name="event_count" widget="statinfo" string="Events"/>
</button>
</div>
<div class="oe_title">
<label for="name"/>
<h1><field name="name"/></h1>
</div>
<group>
<group>
<field name="code"/>
<field name="equipment_type"/>
<field name="facility_id"/>
<field name="nist_traceable"/>
</group>
<group>
<field name="calibration_interval_days"/>
<field name="last_cal_date" readonly="1"/>
<field name="next_cal_date" readonly="1"/>
<field name="manual_state"/>
</group>
</group>
<notebook>
<page string="Calibration Events">
<field name="event_ids" readonly="1">
<list>
<field name="cal_date"/>
<field name="performed_by_id"/>
<field name="result" widget="badge"
decoration-success="result == 'pass'"
decoration-warning="result == 'limited'"
decoration-danger="result == 'fail'"/>
<field name="certificate_ref"/>
</list>
</field>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<record id="view_fp_cal_equipment_kanban" model="ir.ui.view">
<field name="name">fp.cal.equipment.kanban</field>
<field name="model">fusion.plating.calibration.equipment</field>
<field name="arch" type="xml">
<kanban default_group_by="state">
<field name="id"/>
<field name="name"/>
<field name="code"/>
<field name="equipment_type"/>
<field name="next_cal_date"/>
<field name="state"/>
<templates>
<t t-name="card">
<div class="o_fp_card" t-att-data-state="record.state.raw_value">
<strong class="o_fp_card_title">
<field name="code"/><field name="name"/>
</strong>
<div class="small text-muted"><field name="equipment_type"/></div>
<div class="small mt-2">
<i class="fa fa-calendar me-1 text-muted"/>
Next: <field name="next_cal_date"/>
</div>
<div class="mt-1">
<span t-att-class="'o_fp_overdue' if record.state.raw_value == 'overdue' else ''">
<field name="state"/>
</span>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_fp_cal_equipment_search" model="ir.ui.view">
<field name="name">fp.cal.equipment.search</field>
<field name="model">fusion.plating.calibration.equipment</field>
<field name="arch" type="xml">
<search string="Equipment">
<field name="name"/>
<field name="code"/>
<field name="facility_id"/>
<separator/>
<filter string="Overdue" name="overdue" domain="[('state','=','overdue')]"/>
<filter string="Due Soon" name="due_soon" domain="[('state','=','due_soon')]"/>
<filter string="In Service" name="in_service" domain="[('state','=','in_service')]"/>
<filter string="NIST Traceable" name="nist" domain="[('nist_traceable','=',True)]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<group>
<filter string="Status" name="group_state" context="{'group_by':'state'}"/>
<filter string="Type" name="group_type" context="{'group_by':'equipment_type'}"/>
<filter string="Facility" name="group_facility" context="{'group_by':'facility_id'}"/>
</group>
</search>
</field>
</record>
<record id="action_fp_cal_equipment" model="ir.actions.act_window">
<field name="name">Calibration Equipment</field>
<field name="res_model">fusion.plating.calibration.equipment</field>
<field name="view_mode">list,kanban,form</field>
<field name="search_view_id" ref="view_fp_cal_equipment_search"/>
</record>
<!-- ===================== EVENTS ===================== -->
<record id="view_fp_cal_event_list" model="ir.ui.view">
<field name="name">fp.cal.event.list</field>
<field name="model">fusion.plating.calibration.event</field>
<field name="arch" type="xml">
<list string="Calibration Events"
decoration-success="result == 'pass'"
decoration-warning="result == 'limited'"
decoration-danger="result == 'fail'">
<field name="cal_date"/>
<field name="equipment_id"/>
<field name="performed_by_id"/>
<field name="performed_by_external" optional="hide"/>
<field name="result" widget="badge"
decoration-success="result == 'pass'"
decoration-warning="result == 'limited'"
decoration-danger="result == 'fail'"/>
<field name="certificate_ref"/>
</list>
</field>
</record>
<record id="view_fp_cal_event_form" model="ir.ui.view">
<field name="name">fp.cal.event.form</field>
<field name="model">fusion.plating.calibration.event</field>
<field name="arch" type="xml">
<form string="Calibration Event">
<sheet>
<group>
<group>
<field name="equipment_id"/>
<field name="cal_date"/>
<field name="result"/>
<field name="certificate_ref"/>
</group>
<group>
<field name="performed_by_id"/>
<field name="performed_by_external"/>
<field name="facility_id" readonly="1"/>
</group>
</group>
<notebook>
<page string="As-Found">
<field name="as_found_notes"/>
</page>
<page string="As-Left">
<field name="as_left_notes"/>
</page>
<page string="Impact Assessment" invisible="result == 'pass'">
<field name="impact_assessment"
placeholder="If the result is fail or limited, document which jobs / parts may have been measured by this instrument since the last calibration."/>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<record id="view_fp_cal_event_search" model="ir.ui.view">
<field name="name">fp.cal.event.search</field>
<field name="model">fusion.plating.calibration.event</field>
<field name="arch" type="xml">
<search string="Calibration Events">
<field name="equipment_id"/>
<field name="performed_by_id"/>
<field name="certificate_ref"/>
<separator/>
<filter string="Pass" name="pass_filter" domain="[('result','=','pass')]"/>
<filter string="Limited" name="limited" domain="[('result','=','limited')]"/>
<filter string="Fail" name="fail" domain="[('result','=','fail')]"/>
<group>
<filter string="Equipment" name="group_eq" context="{'group_by':'equipment_id'}"/>
<filter string="Result" name="group_result" context="{'group_by':'result'}"/>
<filter string="Calibration Date" name="group_date" context="{'group_by':'cal_date'}"/>
</group>
</search>
</field>
</record>
<record id="action_fp_cal_event" model="ir.actions.act_window">
<field name="name">Calibration Events</field>
<field name="res_model">fusion.plating.calibration.event</field>
<field name="view_mode">list,form</field>
<field name="search_view_id" ref="view_fp_cal_event_search"/>
</record>
</odoo>

View File

@@ -0,0 +1,163 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Part of the Fusion Plating product family.
-->
<odoo>
<record id="view_fp_capa_list" model="ir.ui.view">
<field name="name">fp.capa.list</field>
<field name="model">fusion.plating.capa</field>
<field name="arch" type="xml">
<list string="CAPAs"
decoration-muted="state == 'closed'"
decoration-danger="is_overdue == True">
<field name="name"/>
<field name="type"/>
<field name="ncr_id"/>
<field name="owner_id"/>
<field name="due_date"/>
<field name="is_overdue" widget="boolean_toggle" optional="hide"/>
<field name="state" widget="badge"
decoration-info="state == 'analysis'"
decoration-warning="state == 'implementation'"
decoration-success="state == 'effective'"
decoration-danger="state == 'not_effective'"
decoration-muted="state == 'closed'"/>
</list>
</field>
</record>
<record id="view_fp_capa_form" model="ir.ui.view">
<field name="name">fp.capa.form</field>
<field name="model">fusion.plating.capa</field>
<field name="arch" type="xml">
<form string="CAPA">
<header>
<button name="action_start_analysis" string="Start Analysis" type="object"
class="oe_highlight" invisible="state != 'draft'"/>
<button name="action_start_implementation" string="Implement" type="object"
invisible="state != 'analysis'"/>
<button name="action_start_verification" string="Verify" type="object"
invisible="state != 'implementation'"/>
<button name="action_mark_effective" string="Mark Effective" type="object"
class="oe_highlight" invisible="state != 'verification'"/>
<button name="action_mark_not_effective" string="Not Effective" type="object"
invisible="state != 'verification'"/>
<button name="action_close" string="Close" type="object"
invisible="state not in ('effective','not_effective')"/>
<button name="action_reset_to_draft" string="Reset" type="object"
invisible="state == 'draft'"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,analysis,implementation,verification,effective,closed"/>
</header>
<sheet>
<div class="oe_title">
<label for="name"/>
<h1><field name="name" readonly="1"/></h1>
</div>
<group>
<group>
<field name="type"/>
<field name="ncr_id"/>
<field name="facility_id" readonly="1"/>
<field name="owner_id"/>
</group>
<group>
<field name="due_date"/>
<field name="is_overdue" readonly="1"/>
<field name="verification_date"/>
<field name="verification_by_id"/>
<field name="is_effective" readonly="1"/>
</group>
</group>
<notebook>
<page string="Description">
<field name="description"/>
</page>
<page string="Root Cause Analysis">
<field name="root_cause_analysis" placeholder="5 Whys, fishbone, or any other structured method."/>
</page>
<page string="Action Plan">
<field name="action_plan"/>
</page>
<page string="Effectiveness">
<field name="effectiveness_notes"/>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<record id="view_fp_capa_kanban" model="ir.ui.view">
<field name="name">fp.capa.kanban</field>
<field name="model">fusion.plating.capa</field>
<field name="arch" type="xml">
<kanban default_group_by="state" class="o_fp_capa_kanban">
<field name="id"/>
<field name="name"/>
<field name="type"/>
<field name="owner_id"/>
<field name="due_date"/>
<field name="is_overdue"/>
<templates>
<t t-name="card">
<div class="o_fp_card o_fp_capa_card"
t-att-data-overdue="record.is_overdue.raw_value">
<div class="d-flex justify-content-between align-items-start">
<strong class="o_fp_card_title"><field name="name"/></strong>
<span class="o_fp_capa_type" t-att-data-type="record.type.raw_value">
<field name="type"/>
</span>
</div>
<div class="small text-muted mt-1">
<i class="fa fa-user me-1"/><field name="owner_id"/>
</div>
<div class="small">
<i class="fa fa-calendar me-1 text-muted"/>
<field name="due_date"/>
<span t-if="record.is_overdue.raw_value" class="o_fp_overdue ms-1">OVERDUE</span>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_fp_capa_search" model="ir.ui.view">
<field name="name">fp.capa.search</field>
<field name="model">fusion.plating.capa</field>
<field name="arch" type="xml">
<search string="CAPAs">
<field name="name"/>
<field name="ncr_id"/>
<field name="owner_id"/>
<separator/>
<filter string="Open" name="open" domain="[('state','not in',['effective','closed'])]"/>
<filter string="Closed" name="closed" domain="[('state','=','closed')]"/>
<filter string="Overdue" name="overdue" domain="[('is_overdue','=',True)]"/>
<filter string="Corrective" name="corrective" domain="[('type','=','corrective')]"/>
<filter string="Preventive" name="preventive" domain="[('type','=','preventive')]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<group>
<filter string="Status" name="group_state" context="{'group_by':'state'}"/>
<filter string="Type" name="group_type" context="{'group_by':'type'}"/>
<filter string="Owner" name="group_owner" context="{'group_by':'owner_id'}"/>
</group>
</search>
</field>
</record>
<record id="action_fp_capa" model="ir.actions.act_window">
<field name="name">CAPAs</field>
<field name="res_model">fusion.plating.capa</field>
<field name="view_mode">kanban,list,form</field>
<field name="search_view_id" ref="view_fp_capa_search"/>
</record>
</odoo>

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Part of the Fusion Plating product family.
-->
<odoo>
<record id="view_fp_customer_spec_list" model="ir.ui.view">
<field name="name">fp.customer.spec.list</field>
<field name="model">fusion.plating.customer.spec</field>
<field name="arch" type="xml">
<list string="Customer Specifications">
<field name="code"/>
<field name="revision"/>
<field name="name"/>
<field name="spec_type" widget="badge"
decoration-info="spec_type == 'industry'"
decoration-success="spec_type == 'customer'"
decoration-warning="spec_type == 'internal'"/>
<field name="partner_id"/>
<field name="effective_date"/>
<field name="document_url" widget="url"/>
</list>
</field>
</record>
<record id="view_fp_customer_spec_form" model="ir.ui.view">
<field name="name">fp.customer.spec.form</field>
<field name="model">fusion.plating.customer.spec</field>
<field name="arch" type="xml">
<form string="Customer Specification">
<sheet>
<div class="oe_title">
<label for="name"/>
<h1><field name="name"/></h1>
</div>
<group>
<group>
<field name="code"/>
<field name="revision"/>
<field name="spec_type"/>
<field name="partner_id"/>
</group>
<group>
<field name="effective_date"/>
<field name="document_url" widget="url"/>
</group>
</group>
<group string="Applicable Processes" name="applicable_processes">
<field name="process_type_ids" widget="many2many_tags" nolabel="1"/>
</group>
<notebook>
<page string="Notes">
<field name="notes"/>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<record id="view_fp_customer_spec_search" model="ir.ui.view">
<field name="name">fp.customer.spec.search</field>
<field name="model">fusion.plating.customer.spec</field>
<field name="arch" type="xml">
<search string="Customer Specs">
<field name="name"/>
<field name="code"/>
<field name="partner_id"/>
<separator/>
<filter string="Industry" name="industry" domain="[('spec_type','=','industry')]"/>
<filter string="Customer" name="customer" domain="[('spec_type','=','customer')]"/>
<filter string="Internal" name="internal" domain="[('spec_type','=','internal')]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<group>
<filter string="Type" name="group_type" context="{'group_by':'spec_type'}"/>
<filter string="Customer" name="group_customer" context="{'group_by':'partner_id'}"/>
</group>
</search>
</field>
</record>
<record id="action_fp_customer_spec" model="ir.actions.act_window">
<field name="name">Customer Specifications</field>
<field name="res_model">fusion.plating.customer.spec</field>
<field name="view_mode">list,form</field>
<field name="search_view_id" ref="view_fp_customer_spec_search"/>
</record>
</odoo>

View File

@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Part of the Fusion Plating product family.
-->
<odoo>
<record id="view_fp_doc_control_list" model="ir.ui.view">
<field name="name">fp.doc.control.list</field>
<field name="model">fusion.plating.doc.control</field>
<field name="arch" type="xml">
<list string="Controlled Documents"
decoration-success="state == 'effective'"
decoration-info="state == 'in_review'"
decoration-muted="state == 'obsolete'">
<field name="name"/>
<field name="doc_type"/>
<field name="revision"/>
<field name="owner_id"/>
<field name="effective_date"/>
<field name="review_date"/>
<field name="state" widget="badge"
decoration-success="state == 'effective'"
decoration-info="state == 'in_review'"
decoration-warning="state == 'approved'"
decoration-muted="state == 'obsolete'"/>
</list>
</field>
</record>
<record id="view_fp_doc_control_form" model="ir.ui.view">
<field name="name">fp.doc.control.form</field>
<field name="model">fusion.plating.doc.control</field>
<field name="arch" type="xml">
<form string="Controlled Document">
<header>
<button name="action_submit_for_review" string="Submit for Review" type="object"
class="oe_highlight" invisible="state != 'draft'"/>
<button name="action_approve" string="Approve" type="object"
invisible="state != 'in_review'"/>
<button name="action_make_effective" string="Make Effective" type="object"
class="oe_highlight" invisible="state != 'approved'"/>
<button name="action_mark_obsolete" string="Mark Obsolete" type="object"
invisible="state != 'effective'"/>
<button name="action_reset_to_draft" string="Reset" type="object"
invisible="state == 'draft'"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,in_review,approved,effective,obsolete"/>
</header>
<sheet>
<div class="oe_title">
<label for="name"/>
<h1><field name="name"/></h1>
</div>
<group>
<group>
<field name="doc_type"/>
<field name="revision"/>
<field name="owner_id"/>
</group>
<group>
<field name="effective_date"/>
<field name="review_date"/>
</group>
</group>
<notebook>
<page string="Attachments">
<field name="attachment_ids" widget="many2many_binary"/>
</page>
<page string="Trained Users">
<field name="trained_user_ids" widget="many2many_tags"/>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<record id="view_fp_doc_control_search" model="ir.ui.view">
<field name="name">fp.doc.control.search</field>
<field name="model">fusion.plating.doc.control</field>
<field name="arch" type="xml">
<search string="Controlled Documents">
<field name="name"/>
<field name="revision"/>
<field name="owner_id"/>
<separator/>
<filter string="Effective" name="effective" domain="[('state','=','effective')]"/>
<filter string="In Review" name="in_review" domain="[('state','=','in_review')]"/>
<filter string="Draft" name="draft" domain="[('state','=','draft')]"/>
<filter string="Obsolete" name="obsolete" domain="[('state','=','obsolete')]"/>
<separator/>
<filter string="Procedures" name="proc" domain="[('doc_type','=','procedure')]"/>
<filter string="Work Instructions" name="wi" domain="[('doc_type','=','work_instruction')]"/>
<filter string="Forms" name="forms" domain="[('doc_type','=','form')]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<group>
<filter string="Type" name="group_type" context="{'group_by':'doc_type'}"/>
<filter string="Status" name="group_state" context="{'group_by':'state'}"/>
<filter string="Owner" name="group_owner" context="{'group_by':'owner_id'}"/>
</group>
</search>
</field>
</record>
<record id="action_fp_doc_control" model="ir.actions.act_window">
<field name="name">Document Control</field>
<field name="res_model">fusion.plating.doc.control</field>
<field name="view_mode">list,form</field>
<field name="search_view_id" ref="view_fp_doc_control_search"/>
</record>
</odoo>

View File

@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Part of the Fusion Plating product family.
-->
<odoo>
<record id="view_fp_fair_list" model="ir.ui.view">
<field name="name">fp.fair.list</field>
<field name="model">fusion.plating.fair</field>
<field name="arch" type="xml">
<list string="First Article Inspection Reports"
decoration-success="result == 'pass'"
decoration-warning="result == 'conditional'"
decoration-danger="result == 'fail'">
<field name="name"/>
<field name="part_number"/>
<field name="part_revision"/>
<field name="customer_id"/>
<field name="performed_date"/>
<field name="performed_by_id"/>
<field name="result" widget="badge"
decoration-success="result == 'pass'"
decoration-warning="result == 'conditional'"
decoration-danger="result == 'fail'"/>
<field name="state" widget="badge"
decoration-info="state == 'in_review'"
decoration-success="state == 'approved'"
decoration-danger="state == 'rejected'"/>
</list>
</field>
</record>
<record id="view_fp_fair_form" model="ir.ui.view">
<field name="name">fp.fair.form</field>
<field name="model">fusion.plating.fair</field>
<field name="arch" type="xml">
<form string="First Article Inspection Report">
<header>
<button name="action_submit_for_review" string="Submit for Review" type="object"
class="oe_highlight" invisible="state != 'draft'"/>
<button name="action_approve" string="Approve" type="object"
class="oe_highlight" invisible="state != 'in_review'"/>
<button name="action_reject" string="Reject" type="object"
invisible="state != 'in_review'"/>
<button name="action_reset_to_draft" string="Reset" type="object"
invisible="state == 'draft'"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,in_review,approved,rejected"/>
</header>
<sheet>
<div class="oe_title">
<label for="name"/>
<h1><field name="name" readonly="1"/></h1>
</div>
<group>
<group>
<field name="part_number"/>
<field name="part_revision"/>
<field name="customer_id"/>
</group>
<group>
<field name="performed_date"/>
<field name="performed_by_id"/>
<field name="result" widget="badge"
decoration-success="result == 'pass'"
decoration-warning="result == 'conditional'"
decoration-danger="result == 'fail'"/>
</group>
</group>
<group string="Processes">
<field name="process_type_ids" widget="many2many_tags" nolabel="1"/>
</group>
<notebook>
<page string="Notes">
<field name="notes"/>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<record id="view_fp_fair_kanban" model="ir.ui.view">
<field name="name">fp.fair.kanban</field>
<field name="model">fusion.plating.fair</field>
<field name="arch" type="xml">
<kanban default_group_by="state">
<field name="id"/>
<field name="name"/>
<field name="part_number"/>
<field name="part_revision"/>
<field name="customer_id"/>
<field name="result"/>
<templates>
<t t-name="card">
<div class="o_fp_card o_fp_fair_card"
t-att-data-result="record.result.raw_value">
<strong class="o_fp_card_title"><field name="name"/></strong>
<div class="small mt-1">
<i class="fa fa-cube me-1 text-muted"/>
<field name="part_number"/>
<span class="text-muted ms-1">Rev <field name="part_revision"/></span>
</div>
<div class="small text-muted">
<i class="fa fa-building me-1"/><field name="customer_id"/>
</div>
<div class="mt-2">
<field name="result"/>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_fp_fair_search" model="ir.ui.view">
<field name="name">fp.fair.search</field>
<field name="model">fusion.plating.fair</field>
<field name="arch" type="xml">
<search string="FAIRs">
<field name="name"/>
<field name="part_number"/>
<field name="customer_id"/>
<separator/>
<filter string="Approved" name="approved" domain="[('state','=','approved')]"/>
<filter string="In Review" name="in_review" domain="[('state','=','in_review')]"/>
<filter string="Rejected" name="rejected" domain="[('state','=','rejected')]"/>
<separator/>
<filter string="Pass" name="pass_filter" domain="[('result','=','pass')]"/>
<filter string="Fail" name="fail" domain="[('result','=','fail')]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<group>
<filter string="Status" name="group_state" context="{'group_by':'state'}"/>
<filter string="Customer" name="group_customer" context="{'group_by':'customer_id'}"/>
<filter string="Result" name="group_result" context="{'group_by':'result'}"/>
</group>
</search>
</field>
</record>
<record id="action_fp_fair" model="ir.actions.act_window">
<field name="name">First Article Inspection Reports</field>
<field name="res_model">fusion.plating.fair</field>
<field name="view_mode">kanban,list,form</field>
<field name="search_view_id" ref="view_fp_fair_search"/>
</record>
</odoo>

View File

@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Part of the Fusion Plating product family.
-->
<odoo>
<!-- ===== QUALITY (parent submenu under the Plating app) ===== -->
<menuitem id="menu_fp_quality"
name="Quality"
parent="fusion_plating.menu_fp_root"
sequence="30"
groups="fusion_plating.group_fusion_plating_operator"/>
<menuitem id="menu_fp_quality_hold"
name="Quality Holds"
parent="menu_fp_quality"
action="action_fp_quality_hold"
sequence="5"/>
<menuitem id="menu_fp_quality_ncr"
name="NCRs"
parent="menu_fp_quality"
action="action_fp_ncr"
sequence="10"/>
<menuitem id="menu_fp_quality_capa"
name="CAPAs"
parent="menu_fp_quality"
action="action_fp_capa"
sequence="20"/>
<menuitem id="menu_fp_quality_fair"
name="First Article Inspections"
parent="menu_fp_quality"
action="action_fp_fair"
sequence="30"/>
<menuitem id="menu_fp_quality_audit"
name="Internal Audits"
parent="menu_fp_quality"
action="action_fp_audit"
sequence="40"/>
<menuitem id="menu_fp_quality_doc_control"
name="Document Control"
parent="menu_fp_quality"
action="action_fp_doc_control"
sequence="50"/>
<!-- ===== CONFIGURATION ENTRIES (sit under the existing Configuration submenu) ===== -->
<menuitem id="menu_fp_config_cal_equipment"
name="Calibration Equipment"
parent="fusion_plating.menu_fp_config"
action="action_fp_cal_equipment"
sequence="60"/>
<menuitem id="menu_fp_config_cal_event"
name="Calibration Events"
parent="fusion_plating.menu_fp_config"
action="action_fp_cal_event"
sequence="70"/>
<menuitem id="menu_fp_config_customer_spec"
name="Customer Specs"
parent="fusion_plating.menu_fp_config"
action="action_fp_customer_spec"
sequence="80"/>
<menuitem id="menu_fp_config_avl"
name="Approved Vendor List"
parent="fusion_plating.menu_fp_config"
action="action_fp_avl"
sequence="90"/>
</odoo>

View File

@@ -0,0 +1,191 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Part of the Fusion Plating product family.
-->
<odoo>
<record id="view_fp_ncr_list" model="ir.ui.view">
<field name="name">fp.ncr.list</field>
<field name="model">fusion.plating.ncr</field>
<field name="arch" type="xml">
<list string="Non-Conformance Reports"
decoration-muted="state == 'closed'"
decoration-warning="state == 'containment'"
decoration-danger="severity == 'critical'">
<field name="name"/>
<field name="reported_date"/>
<field name="facility_id" groups="base.group_multi_company"/>
<field name="source"/>
<field name="severity" widget="badge"
decoration-info="severity == 'low'"
decoration-warning="severity == 'high'"
decoration-danger="severity == 'critical'"/>
<field name="part_ref"/>
<field name="quantity_affected"/>
<field name="customer_partner_id" optional="hide"/>
<field name="bath_id" optional="hide"/>
<field name="capa_count"/>
<field name="state" widget="badge"
decoration-info="state == 'open'"
decoration-warning="state == 'containment'"
decoration-success="state == 'disposition'"
decoration-muted="state == 'closed'"/>
</list>
</field>
</record>
<record id="view_fp_ncr_form" model="ir.ui.view">
<field name="name">fp.ncr.form</field>
<field name="model">fusion.plating.ncr</field>
<field name="arch" type="xml">
<form string="Non-Conformance Report">
<header>
<button name="action_open" string="Open NCR" type="object"
class="oe_highlight" invisible="state != 'draft'"/>
<button name="action_containment" string="Containment" type="object"
invisible="state not in ('open',)"/>
<button name="action_disposition" string="Disposition" type="object"
invisible="state not in ('containment',)"/>
<button name="action_close" string="Close NCR" type="object"
class="oe_highlight" invisible="state not in ('disposition',)"/>
<button name="action_reset_to_draft" string="Reset to Draft" type="object"
invisible="state == 'draft'"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,open,containment,disposition,closed"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="action_view_capas" type="object"
class="oe_stat_button" icon="fa-wrench">
<field name="capa_count" widget="statinfo" string="CAPAs"/>
</button>
</div>
<div class="oe_title">
<label for="name"/>
<h1><field name="name" readonly="1"/></h1>
</div>
<group>
<group>
<field name="facility_id"/>
<field name="source"/>
<field name="severity" widget="badge"
decoration-info="severity == 'low'"
decoration-warning="severity == 'high'"
decoration-danger="severity == 'critical'"/>
<field name="part_ref"/>
<field name="quantity_affected"/>
</group>
<group>
<field name="reported_by_id"/>
<field name="reported_date"/>
<field name="closed_date" readonly="1"/>
<field name="customer_partner_id"/>
<field name="bath_id"/>
<field name="disposition"/>
</group>
</group>
<notebook>
<page string="Description">
<field name="description" placeholder="What happened? Be specific."/>
</page>
<page string="Containment">
<field name="containment" placeholder="Immediate steps taken to contain the non-conformance."/>
</page>
<page string="Root Cause">
<field name="root_cause" placeholder="Root cause analysis findings."/>
</page>
<page string="CAPAs">
<field name="capa_ids">
<list>
<field name="name"/>
<field name="type"/>
<field name="owner_id"/>
<field name="due_date"/>
<field name="state" widget="badge"/>
</list>
</field>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<record id="view_fp_ncr_kanban" model="ir.ui.view">
<field name="name">fp.ncr.kanban</field>
<field name="model">fusion.plating.ncr</field>
<field name="arch" type="xml">
<kanban default_group_by="state" class="o_fp_ncr_kanban">
<field name="id"/>
<field name="name"/>
<field name="severity"/>
<field name="source"/>
<field name="facility_id"/>
<field name="reported_date"/>
<field name="capa_count"/>
<templates>
<t t-name="card">
<div class="o_fp_card o_fp_ncr_card"
t-att-data-severity="record.severity.raw_value">
<div class="d-flex justify-content-between align-items-start">
<strong class="o_fp_card_title"><field name="name"/></strong>
<span class="o_fp_severity_pill"
t-att-data-severity="record.severity.raw_value">
<field name="severity"/>
</span>
</div>
<div class="small text-muted mt-1">
<i class="fa fa-industry me-1"/><field name="facility_id"/>
</div>
<div class="small text-muted">
<i class="fa fa-tag me-1"/><field name="source"/>
</div>
<div class="d-flex justify-content-between mt-2 small">
<span class="text-muted">CAPAs</span>
<span class="fw-bold"><field name="capa_count"/></span>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_fp_ncr_search" model="ir.ui.view">
<field name="name">fp.ncr.search</field>
<field name="model">fusion.plating.ncr</field>
<field name="arch" type="xml">
<search string="NCRs">
<field name="name"/>
<field name="part_ref"/>
<field name="customer_partner_id"/>
<field name="facility_id"/>
<field name="bath_id"/>
<separator/>
<filter string="Open" name="open" domain="[('state','in',['open','containment','disposition'])]"/>
<filter string="Closed" name="closed" domain="[('state','=','closed')]"/>
<filter string="Critical" name="critical" domain="[('severity','=','critical')]"/>
<filter string="From Customer" name="customer_src" domain="[('source','=','customer')]"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<group>
<filter string="Status" name="group_state" context="{'group_by':'state'}"/>
<filter string="Source" name="group_source" context="{'group_by':'source'}"/>
<filter string="Severity" name="group_severity" context="{'group_by':'severity'}"/>
<filter string="Facility" name="group_facility" context="{'group_by':'facility_id'}"/>
</group>
</search>
</field>
</record>
<record id="action_fp_ncr" model="ir.actions.act_window">
<field name="name">Non-Conformance Reports</field>
<field name="res_model">fusion.plating.ncr</field>
<field name="view_mode">kanban,list,form</field>
<field name="search_view_id" ref="view_fp_ncr_search"/>
</record>
</odoo>

View File

@@ -0,0 +1,189 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Part of the Fusion Plating product family.
-->
<odoo>
<!-- ===== LIST VIEW ===== -->
<record id="view_fp_quality_hold_list" model="ir.ui.view">
<field name="name">fusion.plating.quality.hold.list</field>
<field name="model">fusion.plating.quality.hold</field>
<field name="arch" type="xml">
<list string="Quality Holds" default_order="create_date desc">
<field name="name" decoration-bf="1"/>
<field name="part_ref"/>
<field name="qty_on_hold"/>
<field name="hold_reason"/>
<field name="state"
widget="badge"
decoration-warning="state == 'on_hold'"
decoration-info="state == 'under_review'"
decoration-success="state == 'released'"
decoration-danger="state == 'scrapped'"
decoration-muted="state == 'reworked'"/>
<field name="facility_id" optional="show"/>
<field name="work_center_id" optional="show"/>
<field name="operator_id"/>
<field name="create_date"/>
</list>
</field>
</record>
<!-- ===== FORM VIEW ===== -->
<record id="view_fp_quality_hold_form" model="ir.ui.view">
<field name="name">fusion.plating.quality.hold.form</field>
<field name="model">fusion.plating.quality.hold</field>
<field name="arch" type="xml">
<form string="Quality Hold">
<header>
<button name="action_start_review"
string="Start Review"
type="object"
class="btn-primary"
invisible="state != 'on_hold'"/>
<button name="action_release"
string="Release"
type="object"
class="btn-primary"
invisible="state not in ('on_hold', 'under_review')"/>
<button name="action_scrap"
string="Scrap"
type="object"
class="btn-danger"
invisible="state not in ('on_hold', 'under_review')"/>
<button name="action_send_to_rework"
string="Send to Rework"
type="object"
invisible="state not in ('on_hold', 'under_review')"/>
<button name="action_create_ncr"
string="Create NCR"
type="object"
invisible="ncr_id"/>
<field name="state"
widget="statusbar"
statusbar_visible="on_hold,under_review,released"/>
</header>
<sheet>
<div class="oe_title">
<h1><field name="name" readonly="1"/></h1>
</div>
<group>
<group string="Hold Details">
<field name="part_ref"/>
<field name="qty_on_hold"/>
<field name="qty_original"/>
<field name="mark_for_scrap"/>
</group>
<group string="Context">
<field name="hold_reason"/>
<field name="facility_id"/>
<field name="work_center_id"/>
<field name="current_process_node"/>
</group>
</group>
<group>
<field name="description" placeholder="Describe the reason for the hold..."/>
</group>
<group string="Attachments">
<field name="attachment_ids" widget="many2many_binary" nolabel="1"/>
</group>
<!-- Source fields (workorder, production, portal_job) are
added by fusion_plating_bridge_mrp when installed. -->
<group string="Resolution" name="resolution"
invisible="state == 'on_hold'">
<field name="resolved_by_id" readonly="1"/>
<field name="resolution_date" readonly="1"/>
<field name="resolution_notes"/>
<field name="ncr_id" readonly="1"/>
</group>
<group string="Other">
<field name="operator_id"/>
<field name="company_id" invisible="1"/>
<field name="active" invisible="1"/>
</group>
</sheet>
<chatter/>
</form>
</field>
</record>
<!-- ===== KANBAN VIEW ===== -->
<record id="view_fp_quality_hold_kanban" model="ir.ui.view">
<field name="name">fusion.plating.quality.hold.kanban</field>
<field name="model">fusion.plating.quality.hold</field>
<field name="arch" type="xml">
<kanban default_group_by="state" class="o_kanban_small_column">
<templates>
<t t-name="card">
<field name="name" class="fw-bold"/>
<div>
<field name="part_ref"/>
<field name="qty_on_hold"/> pcs
</div>
<div>
<field name="hold_reason" widget="badge"/>
</div>
<div class="text-muted">
<field name="operator_id" widget="many2one_avatar_user"/>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<!-- ===== SEARCH VIEW ===== -->
<record id="view_fp_quality_hold_search" model="ir.ui.view">
<field name="name">fusion.plating.quality.hold.search</field>
<field name="model">fusion.plating.quality.hold</field>
<field name="arch" type="xml">
<search string="Quality Holds">
<field name="name"/>
<field name="part_ref"/>
<field name="operator_id"/>
<filter name="on_hold" string="On Hold"
domain="[('state', '=', 'on_hold')]"/>
<filter name="under_review" string="Under Review"
domain="[('state', '=', 'under_review')]"/>
<filter name="released" string="Released"
domain="[('state', '=', 'released')]"/>
<filter name="scrapped" string="Scrapped"
domain="[('state', '=', 'scrapped')]"/>
<filter name="reworked" string="Reworked"
domain="[('state', '=', 'reworked')]"/>
<separator/>
<group>
<filter name="group_hold_reason" string="Hold Reason"
context="{'group_by': 'hold_reason'}"/>
<filter name="group_facility" string="Facility"
context="{'group_by': 'facility_id'}"/>
<filter name="group_station" string="Station"
context="{'group_by': 'work_center_id'}"/>
<filter name="group_state" string="Status"
context="{'group_by': 'state'}"/>
</group>
</search>
</field>
</record>
<!-- ===== WINDOW ACTION ===== -->
<record id="action_fp_quality_hold" model="ir.actions.act_window">
<field name="name">Quality Holds</field>
<field name="res_model">fusion.plating.quality.hold</field>
<field name="view_mode">list,kanban,form</field>
<field name="search_view_id" ref="view_fp_quality_hold_search"/>
<field name="context">{'search_default_on_hold': 1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
No quality holds yet
</p>
<p>
Quality holds are created when parts are pulled from
production for inspection, rework, or scrap.
</p>
</field>
</record>
</odoo>