From 10d63c88a568628bd1f6e7d1bc39b66d9556960c Mon Sep 17 00:00:00 2001 From: DavidJForgeFlow Date: Mon, 8 Jul 2024 14:55:05 +0200 Subject: [PATCH] [FIX] ddmrp: print BoM Overview correctly show is buffered. --- ddmrp/report/mrp_report_bom_structure.py | 7 ++++--- ddmrp/report/mrp_report_bom_structure.xml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ddmrp/report/mrp_report_bom_structure.py b/ddmrp/report/mrp_report_bom_structure.py index c734ee1f0..c17334e09 100644 --- a/ddmrp/report/mrp_report_bom_structure.py +++ b/ddmrp/report/mrp_report_bom_structure.py @@ -89,11 +89,12 @@ def _get_bom_array_lines( data, level, unfolded_ids, unfolded, parent_unfolded ) for component in data.get("components", []): - if not component["bom_id"]: - continue bom_line = next( filter( - lambda line: line.get("bom_id", None) == component["bom_id"], lines + lambda line: line.get("bom_id", False) == component["bom_id"] + and line.get("name", False) == component["name"] + and line.get("level", False) == component["level"], + lines, ) ) if bom_line: diff --git a/ddmrp/report/mrp_report_bom_structure.xml b/ddmrp/report/mrp_report_bom_structure.xml index e5752e76e..bf975528d 100644 --- a/ddmrp/report/mrp_report_bom_structure.xml +++ b/ddmrp/report/mrp_report_bom_structure.xml @@ -6,7 +6,7 @@ - +