chore(plating): de-dash shipped code + intake-neutral customer emails
Replace em-dashes and en-dashes with hyphens across 789 shipped source files (py/xml/js/scss) so the delivered module reads as human-written; em-dashes had become a recognizable AI-generated tell. Internal .md dev notes are excluded. The WO-sticker mojibake strippers keep their dash search targets (now written — / –). No logic changes: comments and display strings only; validated with py_compile + lxml parse. Rewrite the 7 customer notification emails to be intake-neutral (ship-in / drop-off / pickup) and repair-aware, and fix the Shipped email documents line (packing slip vs bill of lading; certificate only when issued). Subjects use a hyphen separator. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
# Copyright 2026 Nexa Systems Inc.
|
||||
# License OPL-1 (Odoo Proprietary License v1.0)
|
||||
#
|
||||
# Phase 3 — parallel job link on fp.certificate.
|
||||
# Phase 3 - parallel job link on fp.certificate.
|
||||
# Coexists with bridge_mrp's production_id link.
|
||||
#
|
||||
# v19.0.6.20.0 — surface the Fischerscope PDF on the cert form so
|
||||
# v19.0.6.20.0 - surface the Fischerscope PDF on the cert form so
|
||||
# operators can SEE that the thickness report will be (or has been)
|
||||
# merged into the CoC. The merge logic itself lives in
|
||||
# fusion_plating_certificates/models/fp_certificate.py — this file
|
||||
# fusion_plating_certificates/models/fp_certificate.py - this file
|
||||
# only adds the human-readable indicators.
|
||||
|
||||
from odoo import api, fields, models
|
||||
@@ -74,7 +74,7 @@ class FpCertificate(models.Model):
|
||||
else:
|
||||
status = 'pending'
|
||||
elif QC is not None and rec.x_fc_job_id:
|
||||
# Same lookup the merge method uses — passed-first,
|
||||
# Same lookup the merge method uses - passed-first,
|
||||
# then any QC with a PDF.
|
||||
qc = QC.sudo().search([
|
||||
('job_id', '=', rec.x_fc_job_id.id),
|
||||
@@ -97,7 +97,7 @@ class FpCertificate(models.Model):
|
||||
rec.x_fc_thickness_status = status
|
||||
|
||||
def action_view_thickness_qc(self):
|
||||
"""Smart-button target — open the linked QC for inspection."""
|
||||
"""Smart-button target - open the linked QC for inspection."""
|
||||
self.ensure_one()
|
||||
if not self.x_fc_thickness_qc_id:
|
||||
return False
|
||||
@@ -111,7 +111,7 @@ class FpCertificate(models.Model):
|
||||
}
|
||||
|
||||
def action_open_job(self):
|
||||
"""Smart-button target — open the linked plating job."""
|
||||
"""Smart-button target - open the linked plating job."""
|
||||
self.ensure_one()
|
||||
if not self.x_fc_job_id:
|
||||
return False
|
||||
@@ -127,7 +127,7 @@ class FpCertificate(models.Model):
|
||||
# ---- Parse-on-upload for the cert-form Fischerscope field (2026-05-28)
|
||||
# The Issue Certs wizard parses .doc/.docx/RTF Fischerscope exports into
|
||||
# readings + metadata + microscope image. Dropping the same file straight
|
||||
# onto the cert form's x_fc_local_thickness_pdf field did nothing — it
|
||||
# onto the cert form's x_fc_local_thickness_pdf field did nothing - it
|
||||
# just stored the bytes. These hooks give the form the SAME behaviour as
|
||||
# the wizard: on save, a non-PDF upload is parsed and relocated to the
|
||||
# evidence field (a real PDF is left in place to merge as page 2).
|
||||
@@ -157,7 +157,7 @@ class FpCertificate(models.Model):
|
||||
then relocate the non-PDF source to x_fc_local_thickness_evidence_id
|
||||
and clear the PDF field (so the page-2 merge doesn't choke on it).
|
||||
|
||||
A real PDF is left in place — it merges as page 2 of the CoC on
|
||||
A real PDF is left in place - it merges as page 2 of the CoC on
|
||||
Issue and carries no parseable readings. Unknown non-PDF types are
|
||||
left untouched.
|
||||
"""
|
||||
@@ -178,7 +178,7 @@ class FpCertificate(models.Model):
|
||||
is_rtf = raw[:5] == b'{\\rtf'
|
||||
is_docx = name.endswith('.docx')
|
||||
if not (is_rtf or is_docx):
|
||||
return # unknown non-PDF — don't guess
|
||||
return # unknown non-PDF - don't guess
|
||||
|
||||
from ..wizards.fp_cert_issue_wizard import (
|
||||
_fp_parse_fischerscope_rtf, _fp_parse_fischerscope_docx,
|
||||
@@ -219,7 +219,7 @@ class FpCertificate(models.Model):
|
||||
except ValueError:
|
||||
continue
|
||||
|
||||
# Readings — replace any existing set with the freshly-parsed rows
|
||||
# Readings - replace any existing set with the freshly-parsed rows
|
||||
# (the uploaded report is authoritative for this cert).
|
||||
readings = parsed.get('readings') or []
|
||||
Reading = self.env.get('fp.thickness.reading')
|
||||
@@ -249,7 +249,7 @@ class FpCertificate(models.Model):
|
||||
vals['x_fc_local_thickness_pdf'] = False
|
||||
vals['x_fc_local_thickness_pdf_filename'] = False
|
||||
|
||||
# Microscope image (RTF only — .docx images need a different path).
|
||||
# Microscope image (RTF only - .docx images need a different path).
|
||||
if is_rtf and 'x_fc_thickness_image_id' in self._fields:
|
||||
try:
|
||||
pngs = _fp_extract_rtf_images(raw)
|
||||
|
||||
Reference in New Issue
Block a user