minor fixes
diff --git a/buying/doctype/supplier/supplier.py b/buying/doctype/supplier/supplier.py
index 0e28f1f..6310653 100644
--- a/buying/doctype/supplier/supplier.py
+++ b/buying/doctype/supplier/supplier.py
@@ -107,8 +107,7 @@
#validation for Naming Series mandatory field...
if get_defaults()['supp_master_name'] == 'Naming Series':
if not self.doc.naming_series:
- msgprint("Series is Mandatory.")
- raise Exception
+ msgprint("Series is Mandatory.", raise_exception=1)
def create_account_head(self):
if self.doc.company :
diff --git a/production/doctype/bom/bom.py b/production/doctype/bom/bom.py
index a413f6a..68e1c3c 100644
--- a/production/doctype/bom/bom.py
+++ b/production/doctype/bom/bom.py
@@ -240,14 +240,12 @@
# add operation in op list
self.op.append(cstr(d.operation_no))
-
-
def validate_materials(self):
""" Validate raw material entries """
check_list = []
for m in getlist(self.doclist, 'bom_materials'):
# check if operation no not in op table
- if m.operation_no not in self.op:
+ if cstr(m.operation_no) not in self.op:
msgprint("""Operation no: %s against item: %s at row no: %s is not present
at Operations table"""% (m.operation_no, m.item_code, m.idx), raise_exception = 1)
diff --git a/stock/doctype/item/item.py b/stock/doctype/item/item.py
index 92dc82b..41ae423 100644
--- a/stock/doctype/item/item.py
+++ b/stock/doctype/item/item.py
@@ -141,7 +141,7 @@
'is_purchase_item' :'Is Purchase Item',
'is_pro_applicable' :'Is Pro Applicable'}
for d in fl:
- if cstr(self.doc.fields[d]) != 'Yes':
+ if cstr(self.doc.fields.get(d)) != 'Yes':
self.check_for_active_boms(check = fl[d])
self.check_ref_rate_detail()
self.fill_customer_code()