From 90cd957d6e73c3633f088bc83668a1bbcecd0178 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 24 Mar 2026 22:39:49 +0530 Subject: [PATCH] fix: do not check for sub assembly reference for rm of fg (#53758) --- .../doctype/production_plan/production_plan.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 9da41253c5b..d9f04b09b23 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -615,7 +615,12 @@ class ProductionPlan(Document): None, ): item.db_set("sub_assembly_item_reference", reference) - elif self.reserve_stock and item.main_item_code and item.from_bom: + elif ( + self.reserve_stock + and item.main_item_code + and item.from_bom + and item.main_item_code != frappe.get_cached_value("BOM", item.from_bom, "item") + ): frappe.throw( _( "Sub assembly item references are missing. Please fetch the sub assemblies and raw materials again."