Skip to content

Commit 1872dcc

Browse files
fix: do not check for sub assembly reference for rm of fg (backport #53758) (#53759)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com> fix: do not check for sub assembly reference for rm of fg (#53758)
1 parent 47438a4 commit 1872dcc

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

erpnext/manufacturing/doctype/production_plan/production_plan.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,12 @@ def add_reference_to_raw_materials(self):
616616
None,
617617
):
618618
item.db_set("sub_assembly_item_reference", reference)
619-
elif self.reserve_stock and item.main_item_code and item.from_bom:
619+
elif (
620+
self.reserve_stock
621+
and item.main_item_code
622+
and item.from_bom
623+
and item.main_item_code != frappe.get_cached_value("BOM", item.from_bom, "item")
624+
):
620625
frappe.throw(
621626
_(
622627
"Sub assembly item references are missing. Please fetch the sub assemblies and raw materials again."

0 commit comments

Comments
 (0)