fix: Leave application status (#23043)

* fix: leave application status update fix

* fix:adding patch
This commit is contained in:
Anupam Kumar
2020-08-18 14:43:34 +05:30
committed by GitHub
parent 693bf1309a
commit 09b6628e53
3 changed files with 14 additions and 4 deletions

View File

@@ -1,5 +1,4 @@
{
"actions": [],
"allow_import": 1,
"autoname": "naming_series:",
"creation": "2013-02-20 11:18:11",
@@ -167,6 +166,7 @@
"fieldtype": "Column Break"
},
{
"allow_on_submit": 1,
"default": "Open",
"fieldname": "status",
"fieldtype": "Select",
@@ -246,9 +246,8 @@
"icon": "fa fa-calendar",
"idx": 1,
"is_submittable": 1,
"links": [],
"max_attachments": 3,
"modified": "2020-03-10 22:40:43.487721",
"modified": "2020-08-13 17:22:44.832397",
"modified_by": "Administrator",
"module": "HR",
"name": "Leave Application",
@@ -333,4 +332,4 @@
"sort_order": "DESC",
"timeline_field": "employee",
"title_field": "employee_name"
}
}

View File

@@ -676,3 +676,4 @@ erpnext.patches.v12_0.move_due_advance_amount_to_pending_amount
erpnext.patches.v12_0.set_multi_uom_in_rfq
erpnext.patches.v12_0.update_state_code_for_daman_and_diu
erpnext.patches.v12_0.rename_lost_reason_detail
erpnext.patches.v12_0.update_leave_application_status

View File

@@ -0,0 +1,10 @@
from __future__ import unicode_literals
import frappe
def execute():
# frappe.reload_doc('HR', 'doctype', 'leave_application')
frappe.db.sql("""
UPDATE `tabLeave Application` SET
status = 'Cancelled'
WHERE status = 'Approved' and docstatus = 2
""")