Removed cstr in return for get_server_fields()
diff --git a/accounts/doctype/account/account.py b/accounts/doctype/account/account.py
index 52c66a9..6c8003a 100644
--- a/accounts/doctype/account/account.py
+++ b/accounts/doctype/account/account.py
@@ -31,7 +31,7 @@
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
diff --git a/accounts/doctype/form_16a/form_16a.py b/accounts/doctype/form_16a/form_16a.py
index 0bcef6b..018b834 100644
--- a/accounts/doctype/form_16a/form_16a.py
+++ b/accounts/doctype/form_16a/form_16a.py
@@ -56,7 +56,7 @@
'party_address': cstr(address_display)
}
- return cstr(ret)
+ return ret
# Get TDS Return acknowledgement
#-------------------------------
diff --git a/accounts/doctype/payable_voucher/payable_voucher.py b/accounts/doctype/payable_voucher/payable_voucher.py
index e88066a..d7f628f 100644
--- a/accounts/doctype/payable_voucher/payable_voucher.py
+++ b/accounts/doctype/payable_voucher/payable_voucher.py
@@ -345,7 +345,7 @@
# 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
#-------------------
diff --git a/buying/doctype/indent/indent.py b/buying/doctype/indent/indent.py
index 450ea64..882098f 100644
--- a/buying/doctype/indent/indent.py
+++ b/buying/doctype/indent/indent.py
@@ -90,12 +90,12 @@
# 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
#-----------------------------
diff --git a/hr/doctype/leave_application/leave_application.py b/hr/doctype/leave_application/leave_application.py
index 5f69c63..01bf7fe 100755
--- a/hr/doctype/leave_application/leave_application.py
+++ b/hr/doctype/leave_application/leave_application.py
@@ -33,7 +33,7 @@
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 @@
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 *************************************************
diff --git a/production/doctype/bill_of_materials/bill_of_materials.py b/production/doctype/bill_of_materials/bill_of_materials.py
index d7d3db5..d287d2f 100644
--- a/production/doctype/bill_of_materials/bill_of_materials.py
+++ b/production/doctype/bill_of_materials/bill_of_materials.py
@@ -106,7 +106,7 @@
'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
diff --git a/production/doctype/production_order/production_order.py b/production/doctype/production_order/production_order.py
index ce8f082..570c802 100644
--- a/production/doctype/production_order/production_order.py
+++ b/production/doctype/production_order/production_order.py
@@ -34,7 +34,7 @@
'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 :
diff --git a/projects/doctype/project/project.py b/projects/doctype/project/project.py
index 084df6c..9930bf4 100644
--- a/projects/doctype/project/project.py
+++ b/projects/doctype/project/project.py
@@ -52,7 +52,7 @@
'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
diff --git a/setup/doctype/workflow_rule/workflow_rule.py b/setup/doctype/workflow_rule/workflow_rule.py
index 3a8cc82..792cbf0 100644
--- a/setup/doctype/workflow_rule/workflow_rule.py
+++ b/setup/doctype/workflow_rule/workflow_rule.py
@@ -281,4 +281,4 @@
elif cond_hold =='Yes':
all_cond_hold ='Yes'
- return all_cond_hold
\ No newline at end of file
+ return all_cond_hold
diff --git a/stock/doctype/item/item.py b/stock/doctype/item/item.py
index d51fb3a..b506541 100644
--- a/stock/doctype/item/item.py
+++ b/stock/doctype/item/item.py
@@ -169,7 +169,7 @@
'description' : file and file[0]['description'] or ''
}
- return str(ret)
+ return ret
def check_if_sle_exists(self):
"""
diff --git a/utilities/doctype/file_browser_control/file_browser_control.py b/utilities/doctype/file_browser_control/file_browser_control.py
index 8008ae9..d5ad0cc 100644
--- a/utilities/doctype/file_browser_control/file_browser_control.py
+++ b/utilities/doctype/file_browser_control/file_browser_control.py
@@ -69,7 +69,7 @@
'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 @@
'file_name' : f.file_name
}
- return cstr(ret)
+ return ret
else:
return 'No file found.'
else:
@@ -195,4 +195,4 @@
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
\ No newline at end of file
+ return privilege