fix: fetch "Employee Leave Policy" from "Employee Grade" if available (#22570)
* fix:fetch "Employee Leave Policy" from "Employee Grade" if available
* fix: checked "Fetch IF Empty" checkbox
Co-authored-by: Marica <maricadsouza221197@gmail.com>
diff --git a/erpnext/hr/doctype/employee/employee.json b/erpnext/hr/doctype/employee/employee.json
index 7dacacf1..f2afe06 100644
--- a/erpnext/hr/doctype/employee/employee.json
+++ b/erpnext/hr/doctype/employee/employee.json
@@ -410,6 +410,8 @@
"options": "Branch"
},
{
+ "fetch_from": "grade.default_leave_policy",
+ "fetch_if_empty": 1,
"fieldname": "leave_policy",
"fieldtype": "Link",
"label": "Leave Policy",
@@ -804,16 +806,14 @@
"fieldname": "expense_approver",
"fieldtype": "Link",
"label": "Expense Approver",
- "options": "User",
- "show_days": 1,
- "show_seconds": 1
+ "options": "User"
}
],
"icon": "fa fa-user",
"idx": 24,
"image_field": "image",
"links": [],
- "modified": "2020-06-18 18:01:27.223535",
+ "modified": "2020-07-03 21:28:04.109189",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee",