From d9d5925f149064c61cd0e518365baf3fdc398656 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 27 May 2015 16:52:06 +0530 Subject: [PATCH] [fix] BOM item validation in lower case --- erpnext/manufacturing/doctype/bom/bom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 4c87dc7cd2..d4fa02c752 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -424,6 +424,6 @@ def validate_bom_no(item, bom_no): if bom.docstatus != 1: if not getattr(frappe.flags, "in_test", False): frappe.throw(_("BOM {0} must be submitted").format(bom_no)) - if item and not (bom.item == item or \ - bom.item == frappe.db.get_value("Item", item, "variant_of")): + if item and not (bom.item.lower() == item.lower() or \ + bom.item.lower() == frappe.db.get_value("Item", item, "variant_of").lower()): frappe.throw(_("BOM {0} does not belong to Item {1}").format(bom_no, item))