minor fixes
This commit is contained in:
parent
d8b85073cd
commit
9021ef75d1
@ -107,8 +107,7 @@ class DocType(TransactionBase):
|
||||
#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 :
|
||||
|
@ -240,14 +240,12 @@ class DocType:
|
||||
# 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)
|
||||
|
||||
|
@ -141,7 +141,7 @@ class DocType:
|
||||
'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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user