mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 03:39:11 +00:00
minor fixes
This commit is contained in:
@@ -107,8 +107,7 @@ class DocType(TransactionBase):
|
|||||||
#validation for Naming Series mandatory field...
|
#validation for Naming Series mandatory field...
|
||||||
if get_defaults()['supp_master_name'] == 'Naming Series':
|
if get_defaults()['supp_master_name'] == 'Naming Series':
|
||||||
if not self.doc.naming_series:
|
if not self.doc.naming_series:
|
||||||
msgprint("Series is Mandatory.")
|
msgprint("Series is Mandatory.", raise_exception=1)
|
||||||
raise Exception
|
|
||||||
|
|
||||||
def create_account_head(self):
|
def create_account_head(self):
|
||||||
if self.doc.company :
|
if self.doc.company :
|
||||||
|
|||||||
@@ -240,14 +240,12 @@ class DocType:
|
|||||||
# add operation in op list
|
# add operation in op list
|
||||||
self.op.append(cstr(d.operation_no))
|
self.op.append(cstr(d.operation_no))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def validate_materials(self):
|
def validate_materials(self):
|
||||||
""" Validate raw material entries """
|
""" Validate raw material entries """
|
||||||
check_list = []
|
check_list = []
|
||||||
for m in getlist(self.doclist, 'bom_materials'):
|
for m in getlist(self.doclist, 'bom_materials'):
|
||||||
# check if operation no not in op table
|
# 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
|
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)
|
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_purchase_item' :'Is Purchase Item',
|
||||||
'is_pro_applicable' :'Is Pro Applicable'}
|
'is_pro_applicable' :'Is Pro Applicable'}
|
||||||
for d in fl:
|
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_for_active_boms(check = fl[d])
|
||||||
self.check_ref_rate_detail()
|
self.check_ref_rate_detail()
|
||||||
self.fill_customer_code()
|
self.fill_customer_code()
|
||||||
|
|||||||
Reference in New Issue
Block a user