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 @@ - +