We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47438a4 commit 1872dccCopy full SHA for 1872dcc
1 file changed
erpnext/manufacturing/doctype/production_plan/production_plan.py
@@ -616,7 +616,12 @@ def add_reference_to_raw_materials(self):
616
None,
617
):
618
item.db_set("sub_assembly_item_reference", reference)
619
- elif self.reserve_stock and item.main_item_code and item.from_bom:
+ 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
+ ):
625
frappe.throw(
626
_(
627
"Sub assembly item references are missing. Please fetch the sub assemblies and raw materials again."
0 commit comments