From 2c404cf34fcf4002b81d37e2e0fcda469a72c8bd Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Mon, 27 Oct 2014 14:26:25 +0530 Subject: [PATCH] FIX validate-bom wrong condition --- erpnext/manufacturing/doctype/bom/bom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 399e71ca92c..5f27c8d795a 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -420,7 +420,7 @@ def validate_bom_no(item, bom_no): bom = frappe.get_doc("BOM", bom_no) if not bom.is_active: frappe.throw(_("BOM {0} must be active").format(bom_no)) - if not bom.docstatus!=1: + if not 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 \