Replaced spaces with tabs
This commit is contained in:
parent
26786bd35d
commit
1e693fe6c9
@ -3,15 +3,14 @@ import frappe
|
|||||||
# Set department value based on employee value
|
# Set department value based on employee value
|
||||||
|
|
||||||
def execute():
|
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',
|
for doctype in doctypes_to_update:
|
||||||
'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:
|
|
||||||
if frappe.db.table_exists(doctype):
|
if frappe.db.table_exists(doctype):
|
||||||
frappe.db.sql("""
|
frappe.db.sql("""
|
||||||
update `tab%s` dt
|
update `tab%s` dt
|
||||||
set department=(select department from `tabEmployee` where name=dt.employee)
|
set department=(select department from `tabEmployee` where name=dt.employee)
|
||||||
""" % doctype)
|
""" % doctype)
|
Loading…
x
Reference in New Issue
Block a user