Skip to content

Commit

Permalink
Merge pull request #40816 from rohitwaghchaure/fixed-12159
Browse files Browse the repository at this point in the history
fix: added validation if parent id is missing in BOM Creator
  • Loading branch information
rohitwaghchaure authored Apr 2, 2024
2 parents 271fea6 + 0a1fab7 commit 4c8dfb2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions erpnext/manufacturing/doctype/bom_creator/bom_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ def create_boms(self):
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())))
Expand Down

0 comments on commit 4c8dfb2

Please sign in to comment.