From 85800fa92944c10a561732b2f9db86b05e26097f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 19 Dec 2013 10:57:43 +0530 Subject: [PATCH] fixes in item validation --- stock/doctype/item/item.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stock/doctype/item/item.py b/stock/doctype/item/item.py index b5884b4111..01f1d9f38f 100644 --- a/stock/doctype/item/item.py +++ b/stock/doctype/item/item.py @@ -123,14 +123,14 @@ class DocType(DocListController, WebsiteGenerator): msgprint("'Has Serial No' can not be 'Yes' for non-stock item", raise_exception=1) def check_for_active_boms(self): - if self.doc.is_active != "Yes" or self.doc.is_purchase_item != "Yes": + if self.doc.is_purchase_item != "Yes": bom_mat = webnotes.conn.sql("""select distinct t1.parent from `tabBOM Item` t1, `tabBOM` t2 where t2.name = t1.parent and t1.item_code =%s and ifnull(t1.bom_no, '') = '' and t2.is_active = 1 and t2.docstatus = 1 and t1.docstatus =1 """, self.doc.name) if bom_mat and bom_mat[0][0]: - webnotes.throw(_("Item must be active and purchase item, \ + webnotes.throw(_("Item must be a purchase item, \ as it is present in one or many Active BOMs")) if self.doc.is_manufactured_item != "Yes":