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):
|
||||
add=sql("Select address from `tab%s` where name='%s'"%(self.doc.master_type,self.doc.master_name))
|
||||
ret={'address':add[0][0]}
|
||||
return cstr(ret)
|
||||
return ret
|
||||
|
||||
|
||||
# check whether master name entered for supplier/customer
|
||||
|
@ -56,7 +56,7 @@ class DocType(TransactionBase):
|
||||
'party_address': cstr(address_display)
|
||||
}
|
||||
|
||||
return cstr(ret)
|
||||
return ret
|
||||
|
||||
# Get TDS Return acknowledgement
|
||||
#-------------------------------
|
||||
|
@ -345,7 +345,7 @@ class DocType(TransactionBase):
|
||||
# get tds rate
|
||||
# -------------
|
||||
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
|
||||
#-------------------
|
||||
|
@ -90,12 +90,12 @@ class DocType:
|
||||
# get item details
|
||||
# ---------------------------------
|
||||
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
|
||||
# ---------------------------------
|
||||
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
|
||||
#-----------------------------
|
||||
|
@ -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 = leave_app and flt(leave_app[0][0]) or 0
|
||||
ret = {'leave_balance':leave_all - leave_app}
|
||||
return str(ret)
|
||||
return ret
|
||||
|
||||
|
||||
# ************************************************ utilities *************************************************
|
||||
@ -55,7 +55,7 @@ class DocType:
|
||||
tot_days = date_diff(self.doc.to_date, self.doc.from_date) + 1
|
||||
holidays = self.get_holidays()
|
||||
ret = {'total_leave_days':flt(tot_days)-flt(holidays)}
|
||||
return str(ret)
|
||||
return ret
|
||||
|
||||
|
||||
# ************************************************ validate *************************************************
|
||||
|
@ -106,7 +106,7 @@ class DocType:
|
||||
'standard_rate' : 0
|
||||
}
|
||||
ret_item.update(ret_bom_rates)
|
||||
return cstr(ret_item)
|
||||
return ret_item
|
||||
|
||||
def set_as_default_bom(self):
|
||||
# set Is Default as 1
|
||||
|
@ -34,7 +34,7 @@ class DocType:
|
||||
'stock_uom' : item and item[0]['stock_uom'] or '',
|
||||
'default_bom' : item and item[0]['default_bom'] or ''
|
||||
}
|
||||
return cstr(ret)
|
||||
return ret
|
||||
|
||||
def validate(self):
|
||||
if not self.doc.production_item :
|
||||
|
@ -52,7 +52,7 @@ class DocType:
|
||||
'contact_no' : contact and contact[0]['contact_no'] or '',
|
||||
'email_id' : contact and contact[0]['email_id'] or ''
|
||||
}
|
||||
return str(ret)
|
||||
return ret
|
||||
else:
|
||||
msgprint("Contact Person : %s does not exist in the system." % (self.doc,contact_person))
|
||||
raise Exception
|
||||
|
@ -281,4 +281,4 @@ class DocType:
|
||||
elif 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 ''
|
||||
|
||||
}
|
||||
return str(ret)
|
||||
return ret
|
||||
|
||||
def check_if_sle_exists(self):
|
||||
"""
|
||||
|
@ -69,7 +69,7 @@ class DocType:
|
||||
'name' : f_obj.doc.name,
|
||||
'label' : f_obj.doc.file_name
|
||||
}
|
||||
return cstr(ret)
|
||||
return ret
|
||||
|
||||
# Update changes done to selected file group.
|
||||
def update_grp(self,arg):
|
||||
@ -160,7 +160,7 @@ class DocType:
|
||||
'file_name' : f.file_name
|
||||
}
|
||||
|
||||
return cstr(ret)
|
||||
return ret
|
||||
else:
|
||||
return 'No file found.'
|
||||
else:
|
||||
@ -195,4 +195,4 @@ class DocType:
|
||||
def get_privileges(self,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'])))
|
||||
return privilege
|
||||
return privilege
|
||||
|
Loading…
x
Reference in New Issue
Block a user