Add Employee Status Temporary Leave (#14423)
This commit is contained in:
parent
8fc64a9717
commit
ebb530385a
@ -574,7 +574,7 @@
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "status",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "\nActive\nLeft",
|
||||
"options": "\nActive\nTemporary Leave\nLeft",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
|
||||
@ -34,7 +34,7 @@ class Employee(NestedSet):
|
||||
|
||||
def validate(self):
|
||||
from erpnext.controllers.status_updater import validate_status
|
||||
validate_status(self.status, ["Active", "Left"])
|
||||
validate_status(self.status, ["Active", "Temporary Leave", "Left"])
|
||||
|
||||
self.employee = self.name
|
||||
self.validate_date()
|
||||
|
||||
@ -3,7 +3,7 @@ frappe.listview_settings['Employee'] = {
|
||||
filters: [["status","=", "Active"]],
|
||||
get_indicator: function(doc) {
|
||||
var indicator = [__(doc.status), frappe.utils.guess_colour(doc.status), "status,=," + doc.status];
|
||||
indicator[1] = {"Active": "green", "Left": "darkgrey"}[doc.status];
|
||||
indicator[1] = {"Active": "green", "Temporary Leave": "red", "Left": "darkgrey"}[doc.status];
|
||||
return indicator;
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user