From 79d9e6b3b085af4686e646619535ce4f7cbe3fe6 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Tue, 21 Apr 2026 23:06:07 -0400 Subject: [PATCH] feat(reports): BoL PDF uses customer_line_header macro (Sub 2 Task 21) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rewired portrait + landscape variants of report_fp_bol. The BoL had no line collection of its own (fusion.plating.delivery only has a soft `job_ref` Char), so the previous cargo-description block was a single hardcoded row. Restructured to look up the job's mrp.production via `job_ref`, iterate its `move_finished_ids` (excluding cancelled), and render each finished-goods move through the shared customer_line_header macro using the `move.sale_line_id or move` adapter pattern. When no MO is found or there are no finished moves, the template falls back to the previous single-row "Plated parts — Job X" behavior so legacy records without a backing MO still print correctly. Per-row QTY now reflects the individual move's `product_uom_qty` instead of the MO's aggregate `product_qty`. Both variants render successfully on entech against a delivery whose job_ref matches a real MO with one finished move. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../report/report_fp_bol.xml | 141 +++++++++++++----- 1 file changed, 102 insertions(+), 39 deletions(-) diff --git a/fusion_plating/fusion_plating_reports/report/report_fp_bol.xml b/fusion_plating/fusion_plating_reports/report/report_fp_bol.xml index ab1665cf..d492de76 100644 --- a/fusion_plating/fusion_plating_reports/report/report_fp_bol.xml +++ b/fusion_plating/fusion_plating_reports/report/report_fp_bol.xml @@ -116,7 +116,10 @@ - + + + @@ -131,24 +134,50 @@ - - - - - - - + + + + + + + + + + + + + + + + + + + +
1 - Plated parts — Job - -
-
-
- - - - TDG - NON-HAZ -
+ 1 + + + + + +
+
+
+ + + TDG + NON-HAZ +
1 + Plated parts — Job + +
+
+
+ + + TDG + NON-HAZ +
@@ -298,7 +327,10 @@ - + + + @@ -314,25 +346,56 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +
1 - Plated parts — Job - -
-
-
- TDG - NON-HAZ - - TDG HANDLING - Standard -
+ 1 + + + + + +
+
+
+ + + TDG + NON-HAZ + + TDG HANDLING + Standard +
1 + Plated parts — Job + +
+
+
+ TDG + NON-HAZ + + TDG HANDLING + Standard +