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)
This commit is contained in:
mergify[bot]
2026-03-25 11:10:16 +05:30
committed by GitHub
parent 47438a44d3
commit 1872dccb0a

View File

@@ -616,7 +616,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."