fix: added validation if parent id is missing in BOM Creator
diff --git a/erpnext/manufacturing/doctype/bom_creator/bom_creator.py b/erpnext/manufacturing/doctype/bom_creator/bom_creator.py
index dcfc798..160b3be 100644
--- a/erpnext/manufacturing/doctype/bom_creator/bom_creator.py
+++ b/erpnext/manufacturing/doctype/bom_creator/bom_creator.py
@@ -239,6 +239,9 @@
frappe._dict({"items": [], "bom_no": "", "fg_item_data": row}),
)
+ if not row.fg_reference_id and production_item_wise_rm.get((row.fg_item, row.fg_reference_id)):
+ frappe.throw(_("Please set Parent Row No for item {0}").format(row.fg_item))
+
production_item_wise_rm[(row.fg_item, row.fg_reference_id)]["items"].append(row)
reverse_tree = OrderedDict(reversed(list(production_item_wise_rm.items())))