From 587988bb06d8d2602857e154e2efc4d2c3295840 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Thu, 4 Jun 2026 12:57:33 -0400 Subject: [PATCH] =?UTF-8?q?feat(fusion=5Fplating=5Fjobs):=20external=20sti?= =?UTF-8?q?cker=20=E2=80=94=20prominent=20thickness=20banner=20+=20strip?= =?UTF-8?q?=20degree=20mojibake?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Relocate plating thickness out of the cramped rail (where it shared a row with Due and wrapped) to a big 21pt "PLATING THICKNESS" banner at the top of the main panel — the team's most-watched spec, now hard to miss. Gated on a new has_thk flag (real value with a digit; skips empty/'N/A'). Due takes the full rail row. - Fix the bake-text degree mojibake: operators type 'º' (U+00BA) for "375ºF"; through this sticker's lightweight html_container path (no .article UTF-8 wrapper) it renders "375°F". Adding a .article wrapper fixes encoding but blows up the dpi=96 mm layout (tested), so _clean() now strips º/°/˚ to clean ASCII -> "375F". Verified on entech (WO-30094). Co-Authored-By: Claude Opus 4.8 (1M context) --- .../fusion_plating_jobs/models/fp_job_sticker.py | 11 ++++++++++- .../report/report_fp_job_sticker.xml | 12 ++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/fusion_plating/fusion_plating_jobs/models/fp_job_sticker.py b/fusion_plating/fusion_plating_jobs/models/fp_job_sticker.py index 6c5dacfd..7ad2c5ff 100644 --- a/fusion_plating/fusion_plating_jobs/models/fp_job_sticker.py +++ b/fusion_plating/fusion_plating_jobs/models/fp_job_sticker.py @@ -18,7 +18,13 @@ def _clean(text): t = str(text) for a, b in ((u'—', '-'), (u'–', '-'), (u'‘', "'"), (u'’', "'"), (u'“', '"'), (u'”', '"'), - (u'…', '...')): + (u'…', '...'), + # Degree symbols: the masculine-ordinal 'º' (U+00BA) operators + # type for "375ºF", the real degree '°' (U+00B0), and the ring + # '˚' ALL mojibake to "°"/"º" through this sticker's lightweight + # html_container path (no .article UTF-8 wrapper — and adding one + # blows up the dpi=96 mm layout). Strip to clean ASCII: "375F". + (u'º', ''), (u'°', ''), (u'˚', '')): t = t.replace(a, b) return t.strip() @@ -88,6 +94,9 @@ class FpJob(models.Model): 'qty': qty, 'due': due_s, 'thk': thk, + # Real thickness present (has a digit) — drives the prominent + # THICKNESS banner; skips empty / 'N/A' / '-' placeholders. + 'has_thk': bool(thk and any(c.isdigit() for c in thk)), 'mask': bool(line and 'x_fc_masking_enabled' in line._fields and line.x_fc_masking_enabled), 'bake': _clean(line.x_fc_bake_instructions) if (line and 'x_fc_bake_instructions' in line._fields) else '', 'internal_notes': _clean(line.x_fc_internal_description) if (line and 'x_fc_internal_description' in line._fields) else '', diff --git a/fusion_plating/fusion_plating_jobs/report/report_fp_job_sticker.xml b/fusion_plating/fusion_plating_jobs/report/report_fp_job_sticker.xml index 24735c2f..8fc03e49 100644 --- a/fusion_plating/fusion_plating_jobs/report/report_fp_job_sticker.xml +++ b/fusion_plating/fusion_plating_jobs/report/report_fp_job_sticker.xml @@ -115,6 +115,7 @@ .r-fld { padding: 0.7mm 2.2mm; } .gtbl { border-collapse: collapse; width: 100%; height: 100%; } .gtbl td { padding: 1mm 2.2mm; vertical-align: middle; } + .m-thk { padding: 1.8mm 2.6mm 2.4mm; } .m-bake { padding: 1.3mm 2.6mm 1.8mm; } .m-notes { padding: 1.3mm 2.6mm 3.5mm; } @@ -233,11 +234,18 @@ Qty
- - +
DueThk (mils)Due
+ + +
PLATING THICKNESS +
+
+
BAKE