Removed cstr in return for get_server_fields()
This commit is contained in:
parent
192db6a7cd
commit
d075a6c53d
@ -31,7 +31,7 @@ class DocType:
|
|||||||
def get_address(self):
|
def get_address(self):
|
||||||
add=sql("Select address from `tab%s` where name='%s'"%(self.doc.master_type,self.doc.master_name))
|
add=sql("Select address from `tab%s` where name='%s'"%(self.doc.master_type,self.doc.master_name))
|
||||||
ret={'address':add[0][0]}
|
ret={'address':add[0][0]}
|
||||||
return cstr(ret)
|
return ret
|
||||||
|
|
||||||
|
|
||||||
# check whether master name entered for supplier/customer
|
# check whether master name entered for supplier/customer
|
||||||
|
@ -56,7 +56,7 @@ class DocType(TransactionBase):
|
|||||||
'party_address': cstr(address_display)
|
'party_address': cstr(address_display)
|
||||||
}
|
}
|
||||||
|
|
||||||
return cstr(ret)
|
return ret
|
||||||
|
|
||||||
# Get TDS Return acknowledgement
|
# Get TDS Return acknowledgement
|
||||||
#-------------------------------
|
#-------------------------------
|
||||||
|
@ -345,7 +345,7 @@ class DocType(TransactionBase):
|
|||||||
# get tds rate
|
# get tds rate
|
||||||
# -------------
|
# -------------
|
||||||
def get_tds_rate(self):
|
def get_tds_rate(self):
|
||||||
return str({'rate' : flt(get_value('Account', self.doc.tax_code, 'tax_rate'))})
|
return {'rate' : flt(get_value('Account', self.doc.tax_code, 'tax_rate'))}
|
||||||
|
|
||||||
# set aging date
|
# set aging date
|
||||||
#-------------------
|
#-------------------
|
||||||
|
@ -90,12 +90,12 @@ class DocType:
|
|||||||
# get item details
|
# get item details
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
def get_item_details(self, arg =''):
|
def get_item_details(self, arg =''):
|
||||||
return cstr( get_obj(dt='Purchase Common').get_item_details(self,arg) )
|
return get_obj(dt='Purchase Common').get_item_details(self,arg)
|
||||||
|
|
||||||
# Get UOM Details
|
# Get UOM Details
|
||||||
# ---------------------------------
|
# ---------------------------------
|
||||||
def get_uom_details(self, arg = ''):
|
def get_uom_details(self, arg = ''):
|
||||||
return cstr(get_obj(dt='Purchase Common').get_uom_details(arg))
|
return get_obj(dt='Purchase Common').get_uom_details(arg)
|
||||||
|
|
||||||
# GET TERMS & CONDITIONS
|
# GET TERMS & CONDITIONS
|
||||||
#-----------------------------
|
#-----------------------------
|
||||||
|
@ -33,7 +33,7 @@ class DocType:
|
|||||||
leave_app = sql("select total_leave_days from `tabLeave Application` where employee = '%s' and leave_type = '%s' and fiscal_year = '%s' and docstatus = 1" % (self.doc.employee, self.doc.leave_type, self.doc.fiscal_year))
|
leave_app = sql("select total_leave_days from `tabLeave Application` where employee = '%s' and leave_type = '%s' and fiscal_year = '%s' and docstatus = 1" % (self.doc.employee, self.doc.leave_type, self.doc.fiscal_year))
|
||||||
leave_app = leave_app and flt(leave_app[0][0]) or 0
|
leave_app = leave_app and flt(leave_app[0][0]) or 0
|
||||||
ret = {'leave_balance':leave_all - leave_app}
|
ret = {'leave_balance':leave_all - leave_app}
|
||||||
return str(ret)
|
return ret
|
||||||
|
|
||||||
|
|
||||||
# ************************************************ utilities *************************************************
|
# ************************************************ utilities *************************************************
|
||||||
@ -55,7 +55,7 @@ class DocType:
|
|||||||
tot_days = date_diff(self.doc.to_date, self.doc.from_date) + 1
|
tot_days = date_diff(self.doc.to_date, self.doc.from_date) + 1
|
||||||
holidays = self.get_holidays()
|
holidays = self.get_holidays()
|
||||||
ret = {'total_leave_days':flt(tot_days)-flt(holidays)}
|
ret = {'total_leave_days':flt(tot_days)-flt(holidays)}
|
||||||
return str(ret)
|
return ret
|
||||||
|
|
||||||
|
|
||||||
# ************************************************ validate *************************************************
|
# ************************************************ validate *************************************************
|
||||||
|
@ -106,7 +106,7 @@ class DocType:
|
|||||||
'standard_rate' : 0
|
'standard_rate' : 0
|
||||||
}
|
}
|
||||||
ret_item.update(ret_bom_rates)
|
ret_item.update(ret_bom_rates)
|
||||||
return cstr(ret_item)
|
return ret_item
|
||||||
|
|
||||||
def set_as_default_bom(self):
|
def set_as_default_bom(self):
|
||||||
# set Is Default as 1
|
# set Is Default as 1
|
||||||
|
@ -34,7 +34,7 @@ class DocType:
|
|||||||
'stock_uom' : item and item[0]['stock_uom'] or '',
|
'stock_uom' : item and item[0]['stock_uom'] or '',
|
||||||
'default_bom' : item and item[0]['default_bom'] or ''
|
'default_bom' : item and item[0]['default_bom'] or ''
|
||||||
}
|
}
|
||||||
return cstr(ret)
|
return ret
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
if not self.doc.production_item :
|
if not self.doc.production_item :
|
||||||
|
@ -52,7 +52,7 @@ class DocType:
|
|||||||
'contact_no' : contact and contact[0]['contact_no'] or '',
|
'contact_no' : contact and contact[0]['contact_no'] or '',
|
||||||
'email_id' : contact and contact[0]['email_id'] or ''
|
'email_id' : contact and contact[0]['email_id'] or ''
|
||||||
}
|
}
|
||||||
return str(ret)
|
return ret
|
||||||
else:
|
else:
|
||||||
msgprint("Contact Person : %s does not exist in the system." % (self.doc,contact_person))
|
msgprint("Contact Person : %s does not exist in the system." % (self.doc,contact_person))
|
||||||
raise Exception
|
raise Exception
|
||||||
|
@ -281,4 +281,4 @@ class DocType:
|
|||||||
elif cond_hold =='Yes':
|
elif cond_hold =='Yes':
|
||||||
all_cond_hold ='Yes'
|
all_cond_hold ='Yes'
|
||||||
|
|
||||||
return all_cond_hold
|
return all_cond_hold
|
||||||
|
@ -169,7 +169,7 @@ Total Available Qty: %s
|
|||||||
'description' : file and file[0]['description'] or ''
|
'description' : file and file[0]['description'] or ''
|
||||||
|
|
||||||
}
|
}
|
||||||
return str(ret)
|
return ret
|
||||||
|
|
||||||
def check_if_sle_exists(self):
|
def check_if_sle_exists(self):
|
||||||
"""
|
"""
|
||||||
|
@ -69,7 +69,7 @@ class DocType:
|
|||||||
'name' : f_obj.doc.name,
|
'name' : f_obj.doc.name,
|
||||||
'label' : f_obj.doc.file_name
|
'label' : f_obj.doc.file_name
|
||||||
}
|
}
|
||||||
return cstr(ret)
|
return ret
|
||||||
|
|
||||||
# Update changes done to selected file group.
|
# Update changes done to selected file group.
|
||||||
def update_grp(self,arg):
|
def update_grp(self,arg):
|
||||||
@ -160,7 +160,7 @@ class DocType:
|
|||||||
'file_name' : f.file_name
|
'file_name' : f.file_name
|
||||||
}
|
}
|
||||||
|
|
||||||
return cstr(ret)
|
return ret
|
||||||
else:
|
else:
|
||||||
return 'No file found.'
|
return 'No file found.'
|
||||||
else:
|
else:
|
||||||
@ -195,4 +195,4 @@ class DocType:
|
|||||||
def get_privileges(self,arg):
|
def get_privileges(self,arg):
|
||||||
arg = eval(arg)
|
arg = eval(arg)
|
||||||
privilege = convert_to_lists(sql("select ifnull(can_edit,''), ifnull(can_view,''),owner from `tab%s` where name='%s'" % (arg['dt'],arg['dn'])))
|
privilege = convert_to_lists(sql("select ifnull(can_edit,''), ifnull(can_view,''),owner from `tab%s` where name='%s'" % (arg['dt'],arg['dn'])))
|
||||||
return privilege
|
return privilege
|
||||||
|
Loading…
x
Reference in New Issue
Block a user