From 2e22b019a0d15dacb3881fdc6a9fc5ccb476a355 Mon Sep 17 00:00:00 2001 From: s-aga-r Date: Fri, 18 Aug 2023 13:24:49 +0530 Subject: [PATCH] fix: throw if `BOM No` is not set --- .../manufacturing/doctype/production_plan/production_plan.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 654f37ef45..131f438e20 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -795,6 +795,9 @@ class ProductionPlan(Document): if not row.item_code: frappe.throw(_("Row #{0}: Please select Item Code in Assembly Items").format(row.idx)) + if not row.bom_no: + frappe.throw(_("Row #{0}: Please select the BOM No in Assembly Items").format(row.idx)) + bom_data = [] warehouse = row.warehouse if self.skip_available_sub_assembly_item else None