From 0a32ed2da7fb82ee6d85933bacc465c4654cbbcf Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Wed, 13 May 2026 08:00:22 -0400 Subject: [PATCH] feat(sticker): per-box render loop + Notes override hook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Inner sticker template gains two parameters that outer templates pre-set: _qty_total — total qty for the line/job. Inner wraps the body in t-foreach="range(int(_qty_total or 1))" so a qty=5 line produces 5 consecutive single-box stickers. Qty row in the body switches from "5" to "1 / 5", "2 / 5", ... "5 / 5". When _qty_total is missing/0/1, the Qty row keeps showing the plain integer (regression-free). _notes_content — Notes column source. Existing inner code hard-read _line.name; new code accepts an outer override and falls back to _line.name. External outers don't set it (unchanged behaviour); the new Internal outers (Task 4+5) pre-set it to x_fc_internal_description. Defaults template initialises both new vars to False so the inner's "outer-supplied OR fallback" pattern doesn't NameError when called from existing outers that haven't been updated yet. Verified regression-free: fp.job 2635 (qty=1) renders identically to its pre-Task baseline — Qty row shows plain "1", Notes from line.name as before. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../fusion_plating_reports/__manifest__.py | 2 +- .../report/report_fp_wo_sticker.xml | 25 +++++++++++++++---- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/fusion_plating/fusion_plating_reports/__manifest__.py b/fusion_plating/fusion_plating_reports/__manifest__.py index 4c8fa563..7336613a 100644 --- a/fusion_plating/fusion_plating_reports/__manifest__.py +++ b/fusion_plating/fusion_plating_reports/__manifest__.py @@ -3,7 +3,7 @@ # License OPL-1 (Odoo Proprietary License v1.0) { 'name': 'Fusion Plating — Reports', - 'version': '19.0.10.11.0', + 'version': '19.0.10.12.0', 'category': 'Manufacturing/Plating', 'summary': 'PDF reports for Fusion Plating: quote, SO, WO, packing, BoL, CoC, invoice, receipt, quality + compliance.', 'depends': [ diff --git a/fusion_plating/fusion_plating_reports/report/report_fp_wo_sticker.xml b/fusion_plating/fusion_plating_reports/report/report_fp_wo_sticker.xml index f362b66e..5d5e8dad 100644 --- a/fusion_plating/fusion_plating_reports/report/report_fp_wo_sticker.xml +++ b/fusion_plating/fusion_plating_reports/report/report_fp_wo_sticker.xml @@ -80,10 +80,12 @@ rendering. ASCII-only printable for any QR-label printer. --> - - + +
@@ -346,7 +353,12 @@ Qty: - + + / + + + + @@ -360,6 +372,7 @@
+