Update move_leave_approvers_from_employee.py

This commit is contained in:
Manas Solanki 2018-04-23 14:55:19 +05:30 committed by GitHub
parent 68a7ee22f2
commit 276a92539d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,6 @@ def execute():
""", as_dict=True)
for record in approvers:
if record.department:
frappe.db.sql("""update `tabDepartment Approver` app set app.parenttype = '{0}',
app.parent = '{1}' and parentfield = 'leave_approver' where app.leave_approver = '{2}'"""
frappe.db.sql("""update `tabDepartment Approver` set parenttype = '{0}',
parent = '{1}' and parentfield = 'leave_approver' where approver = '{2}'"""
.format(_('Department'), record.department, record.leave_approver))