From badc855400dd5a602d0cab528b47830e83e05b4a Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 29 Mar 2018 13:48:38 +0530 Subject: [PATCH] [Fix] BOM validation issue for scrap item (#13429) --- erpnext/manufacturing/doctype/bom/bom.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 862b4ee5045..060894c5413 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -602,6 +602,9 @@ def validate_bom_no(item, bom_no): for d in bom.items: if (d.item_code.lower() == item.lower()): rm_item_exists = True + for d in bom.scrap_items: + if (d.item_code.lower() == item.lower()): + rm_item_exists = True if bom.item.lower() == item.lower() or \ bom.item.lower() == cstr(frappe.db.get_value("Item", item, "variant_of")).lower(): rm_item_exists = True