From 7f2afcd2a88915a1b17ab816459ee643810a0afa Mon Sep 17 00:00:00 2001 From: nabinhait Date: Tue, 28 Jun 2011 18:35:58 +0530 Subject: [PATCH] removed validation: checking active bom if allow pro order is no --- crm/doctype/sales_common/sales_common.py | 2 +- material_management/doctype/item/item.py | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/crm/doctype/sales_common/sales_common.py b/crm/doctype/sales_common/sales_common.py index 2f8c0e2aa1..bc03814950 100644 --- a/crm/doctype/sales_common/sales_common.py +++ b/crm/doctype/sales_common/sales_common.py @@ -707,7 +707,7 @@ class StatusUpdater: set %(target_field)s = (select sum(qty) from `tab%(source_dt)s` where `%(join_field)s`="%(detail_id)s" and (docstatus=1 %(cond)s)) where - name="%(detail_id)s" + name="%(detail_id)s" """ % args) # get unique transactions to update diff --git a/material_management/doctype/item/item.py b/material_management/doctype/item/item.py index 20cd383f3c..a2fbf0123c 100644 --- a/material_management/doctype/item/item.py +++ b/material_management/doctype/item/item.py @@ -102,11 +102,6 @@ class DocType: if bom and bom[0][0]: msgprint("%s should be 'Yes'. As Item %s is present in one or many Active BOMs." % (cstr(check), cstr(self.doc.name))) raise Exception - if check in ['Is Active', 'Is Pro Applicable']: - flat_bom = sql("select distinct t1.parent from `tabFlat BOM Detail` t1, `tabBill Of Materials` t2 where t1.item_code ='%s' and t2.name = t1.parent and t2.is_active = 'Yes' and t2.docstatus = 1 and t1.docstatus =1 and t1.is_pro_applicable = 'Yes'" % self.doc.name ) - if flat_bom and flat_bom[0][0]: - msgprint(" %s should be 'Yes'. As Item %s is present in one or many Active BOMs." % (cstr(check), cstr(self.doc.name))) - raise Exception def validate(self): fl = {'is_manufactured_item' :'Is Manufactured Item',