From 60aedb61925f4e91f747de3ebb49ad941271caa0 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 | 9 ++++++--- ddmrp/report/mrp_report_bom_structure.xml | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ddmrp/report/mrp_report_bom_structure.py b/ddmrp/report/mrp_report_bom_structure.py index 48923c384..2431e5594 100644 --- a/ddmrp/report/mrp_report_bom_structure.py +++ b/ddmrp/report/mrp_report_bom_structure.py @@ -86,10 +86,13 @@ 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 l: l.get("bom_id", None) == component["bom_id"], lines) + filter( + 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: bom_line["is_buffered"] = component["is_buffered"] 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 @@ - +