This commit is contained in:
gsinghpal
2026-04-27 00:11:18 -04:00
parent d9f58b9851
commit f08f328688
116 changed files with 9891 additions and 359 deletions

View File

@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- ============================================================ -->
<!-- S19 — Surface Fischerscope thickness PDF on the cert form -->
<!-- ============================================================ -->
<!-- Without this extension the operator has no way to know, -->
<!-- before clicking Issue, whether the QC's Fischerscope PDF -->
<!-- will be appended to the CoC. After Issue, no indicator that -->
<!-- the merged PDF actually contains it. This extension fixes -->
<!-- both gaps with a banner + smart button + clickable file. -->
<record id="fp_certificate_view_form_jobs"
model="ir.ui.view">
<field name="name">fp.certificate.form.inherit.jobs</field>
<field name="model">fp.certificate</field>
<field name="inherit_id"
ref="fusion_plating_certificates.fp_certificate_view_form"/>
<field name="arch" type="xml">
<!-- 1. Smart button: linked Plating Job, and a separate -->
<!-- smart button for the Fischerscope-source QC. -->
<xpath expr="//div[@name='button_box']" position="inside">
<button name="action_open_job"
type="object"
class="oe_stat_button"
icon="fa-cogs"
invisible="not x_fc_job_id">
<field name="x_fc_job_id" widget="statinfo"
string="Plating Job"/>
</button>
<button name="action_view_thickness_qc"
type="object"
class="oe_stat_button"
icon="fa-microscope"
invisible="not x_fc_thickness_qc_id">
<div class="o_field_widget o_stat_info">
<span class="o_stat_text">
<field name="x_fc_thickness_status" widget="badge"
decoration-info="x_fc_thickness_status == 'pending'"
decoration-success="x_fc_thickness_status == 'merged'"/>
</span>
<span class="o_stat_text">Fischerscope</span>
</div>
</button>
</xpath>
<!-- 2. Banner row above the title — explicit, can't miss. -->
<!-- Three states with distinct alert classes. -->
<xpath expr="//sheet/div[@class='oe_title']" position="before">
<div class="alert alert-info" role="alert"
invisible="x_fc_thickness_status != 'pending'">
<i class="fa fa-info-circle" title="Info"
aria-label="Info"/>
<strong> Fischerscope thickness PDF is on file.</strong>
It will be automatically appended as page&#160;2 of
the CoC when you click <strong>Issue</strong>.
</div>
<div class="alert alert-success" role="alert"
invisible="x_fc_thickness_status != 'merged'">
<i class="fa fa-check-circle" title="Merged"
aria-label="Merged"/>
<strong> Fischerscope thickness report merged.</strong>
The issued CoC PDF includes the Fischerscope report
as page&#160;2 — open the Certificate&#160;PDF tab to verify.
</div>
<div class="alert alert-warning" role="alert"
invisible="not x_fc_job_id or state != 'draft' or x_fc_thickness_status != 'none' or not partner_id"
style="margin-top:0;">
<i class="fa fa-exclamation-triangle" title="Warning"
aria-label="Warning"/>
<strong> No Fischerscope PDF on the linked QC.</strong>
If this customer expects an XRF report with the CoC,
have the operator upload the Fischerscope PDF on the
QC check before issuing.
</div>
</xpath>
<!-- 3. Add a Thickness Report tab right next to the -->
<!-- Certificate PDF tab so operator can preview the -->
<!-- Fischerscope file before merging into the cert. -->
<xpath expr="//notebook/page[@name='pdf']" position="after">
<page string="Thickness Report (Fischerscope)"
name="thickness_pdf"
invisible="not x_fc_job_id">
<group>
<field name="x_fc_thickness_status" widget="badge"
readonly="1"
decoration-muted="x_fc_thickness_status == 'none'"
decoration-info="x_fc_thickness_status == 'pending'"
decoration-success="x_fc_thickness_status == 'merged'"/>
<field name="x_fc_thickness_qc_id" readonly="1"
invisible="not x_fc_thickness_qc_id"/>
<field name="x_fc_thickness_pdf_id" readonly="1"
widget="many2one_binary"
invisible="not x_fc_thickness_pdf_id"/>
</group>
<div class="text-muted"
invisible="x_fc_thickness_status != 'none'">
<p>
No Fischerscope thickness PDF has been
uploaded on the linked QC yet. The CoC will
be issued without an appended thickness
report. To attach one:
</p>
<ol>
<li>Open the linked Plating Job (smart
button above)</li>
<li>Click into the auto-spawned Quality
Check</li>
<li>Go to the <em>Thickness Report</em> tab
and upload the PDF from the Fischerscope
/ XDAL 600 export</li>
<li>Pass the QC, then come back here and
click Issue</li>
</ol>
</div>
<div class="text-muted"
invisible="x_fc_thickness_status != 'pending'">
<p>
<i class="fa fa-arrow-up" title="Action"
aria-label="Action"/>
Click <strong>Issue</strong> in the header
and the Fischerscope PDF above will be
merged into page&#160;2 of the CoC.
</p>
</div>
</page>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Sub 12 Phase D — quality smart-button row on fp.job. The quality
fields (fp_qc_hold_count, fp_qc_check_count, fp_qc_ncr_count,
fp_qc_capa_count, fp_qc_rma_count) are defined in fusion_plating_quality
via _inherit on fp.job. The view lives here because the button_box
container is added by fusion_plating_jobs (this module loads after
quality so we can safely reference quality fields).
-->
<odoo>
<record id="view_fp_job_form_quality_buttons" model="ir.ui.view">
<field name="name">fp.job.form.quality.buttons</field>
<field name="model">fp.job</field>
<field name="inherit_id" ref="view_fp_job_form_jobs_inherit"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='button_box']" position="inside">
<button name="action_view_fp_holds" type="object"
class="oe_stat_button" icon="fa-hand-paper-o">
<field name="fp_qc_hold_count" widget="statinfo" string="Holds"/>
</button>
<button name="action_view_fp_checks" type="object"
class="oe_stat_button" icon="fa-check-square-o">
<field name="fp_qc_check_count" widget="statinfo" string="Checks"/>
</button>
<button name="action_view_fp_ncrs" type="object"
class="oe_stat_button" icon="fa-exclamation-triangle">
<field name="fp_qc_ncr_count" widget="statinfo" string="NCRs"/>
</button>
<button name="action_view_fp_capas" type="object"
class="oe_stat_button" icon="fa-wrench">
<field name="fp_qc_capa_count" widget="statinfo" string="CAPAs"/>
</button>
<button name="action_view_fp_rmas" type="object"
class="oe_stat_button" icon="fa-undo">
<field name="fp_qc_rma_count" widget="statinfo" string="RMAs"/>
</button>
</xpath>
</field>
</record>
</odoo>

View File

@@ -23,10 +23,7 @@
<field name="group_ids" eval="[(6, 0, [])]"/>
</record>
<!-- bridge_mrp: Production Priorities is mrp.workorder ordering UI;
fp.job has its own priority field on the header. Hidden from
operators / supervisors / managers; only the legacy group sees it. -->
<record id="fusion_plating_bridge_mrp.menu_fp_workorder_priority" model="ir.ui.menu">
<field name="group_ids" eval="[(6, 0, [ref('fusion_plating_jobs.group_fusion_plating_legacy_menus')])]"/>
</record>
<!-- bridge_mrp Production Priorities reference removed post-Sub 11
(the bridge module is uninstalled and its menu xmlid no longer
resolves). fp.job has its own priority field on the header. -->
</odoo>

View File

@@ -23,6 +23,14 @@
<field name="x_fc_fp_job_count" widget="statinfo"
string="Plating Jobs"/>
</button>
<!-- Sarah/Tom path: SO → Certificates (one click instead -->
<!-- of two via the job). Hidden until a cert exists. -->
<button name="action_view_fp_certificates" type="object"
class="oe_stat_button" icon="fa-certificate"
invisible="x_fc_fp_certificate_count == 0">
<field name="x_fc_fp_certificate_count" widget="statinfo"
string="Certificates"/>
</button>
</xpath>
</field>
</record>