Replaced spaces with tabs

This commit is contained in:
Nabin Hait 2018-07-17 16:08:39 +05:30
parent 26786bd35d
commit 1e693fe6c9

View File

@ -3,15 +3,14 @@ import frappe
# Set department value based on employee value
def execute():
doctypes_to_update = ['Appraisal', 'Leave Allocation', 'Expense Claim', 'Instructor', 'Salary Slip',
'Attendance', 'Training Feedback', 'Training Result Employee',
'Leave Application', 'Employee Advance', 'Activity Cost', 'Training Event Employee',
'Timesheet', 'Sales Person', 'Payroll Employee Detail']
doctypes_to_update = ['Appraisal', 'Leave Allocation', 'Expense Claim', 'Instructor', 'Salary Slip',
'Attendance', 'Training Feedback', 'Training Result Employee',
'Leave Application', 'Employee Advance', 'Activity Cost', 'Training Event Employee',
'Timesheet', 'Sales Person', 'Payroll Employee Detail']
for doctype in doctypes_to_update:
for doctype in doctypes_to_update:
if frappe.db.table_exists(doctype):
frappe.db.sql("""
update `tab%s` dt
set department=(select department from `tabEmployee` where name=dt.employee)
""" % doctype)
""" % doctype)