fix: do not check for sub assembly reference for rm of fg (#53758)

This commit is contained in:
Mihir Kandoi
2026-03-24 22:39:49 +05:30
committed by GitHub
parent 14a46bf920
commit 90cd957d6e

View File

@@ -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."