mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-03 00:23:21 +00:00
Merge branch 'develop' into fix_mandatory_error
This commit is contained in:
@@ -123,7 +123,7 @@ def get_number_cards():
|
||||
|
||||
number_cards.append(
|
||||
get_number_cards_doc("Employee", "New Joinees (Last year)", filters_json = json.dumps([
|
||||
["Employee","date_of_joining","Previous","1 year"],
|
||||
["Employee","date_of_joining","Timespan","last year"],
|
||||
["Employee","status","=","Active"]
|
||||
])
|
||||
)
|
||||
@@ -131,7 +131,7 @@ def get_number_cards():
|
||||
|
||||
number_cards.append(
|
||||
get_number_cards_doc("Employee", "Employees Left (Last year)", filters_json = json.dumps([
|
||||
["Employee", "relieving_date", "Previous", "1 year"],
|
||||
["Employee", "relieving_date", "Timespan", "last year"],
|
||||
["Employee", "status", "=", "Left"]
|
||||
])
|
||||
)
|
||||
@@ -139,7 +139,7 @@ def get_number_cards():
|
||||
|
||||
number_cards.append(
|
||||
get_number_cards_doc("Job Applicant", "Total Applicants (Last month)", filters_json = json.dumps([
|
||||
["Job Applicant", "creation", "Previous", "1 month"]
|
||||
["Job Applicant", "creation", "Timespan", "last month"]
|
||||
])
|
||||
)
|
||||
)
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -413,7 +413,11 @@ def get_employee_emails(employee_list):
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_children(doctype, parent=None, company=None, is_root=False, is_tree=False):
|
||||
filters = [['company', '=', company]]
|
||||
|
||||
filters = []
|
||||
if company and company != 'All Companies':
|
||||
filters = [['company', '=', company]]
|
||||
|
||||
fields = ['name as value', 'employee_name as title']
|
||||
|
||||
if is_root:
|
||||
|
||||
@@ -4,7 +4,7 @@ frappe.treeview_settings['Employee'] = {
|
||||
{
|
||||
fieldname: "company",
|
||||
fieldtype:"Select",
|
||||
options: erpnext.utils.get_tree_options("company"),
|
||||
options: ['All Companies'].concat(erpnext.utils.get_tree_options("company")),
|
||||
label: __("Company"),
|
||||
default: erpnext.utils.get_tree_default("company")
|
||||
}
|
||||
|
||||
@@ -40,6 +40,8 @@ frappe.ui.form.on("Leave Application", {
|
||||
validate: function(frm) {
|
||||
if (frm.doc.from_date == frm.doc.to_date && frm.doc.half_day == 1){
|
||||
frm.doc.half_day_date = frm.doc.from_date;
|
||||
}else if (frm.doc.half_day == 0){
|
||||
frm.doc.half_day_date = "";
|
||||
}
|
||||
frm.toggle_reqd("half_day_date", frm.doc.half_day == 1);
|
||||
},
|
||||
|
||||
@@ -293,6 +293,8 @@ class LeaveApplication(Document):
|
||||
def set_half_day_date(self):
|
||||
if self.from_date == self.to_date and self.half_day == 1:
|
||||
self.half_day_date = self.from_date
|
||||
elif self.half_day == 0:
|
||||
self.half_day_date = None
|
||||
|
||||
def notify_employee(self):
|
||||
employee = frappe.get_doc("Employee", self.employee)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/human-resources",
|
||||
"idx": 0,
|
||||
"is_complete": 0,
|
||||
"modified": "2020-05-20 11:20:07.992597",
|
||||
"modified": "2020-07-08 14:05:47.018799",
|
||||
"modified_by": "Administrator",
|
||||
"module": "HR",
|
||||
"name": "Human Resource",
|
||||
@@ -44,8 +44,7 @@
|
||||
"step": "HR Settings"
|
||||
}
|
||||
],
|
||||
"subtitle": "Employee, Leaves and more.",
|
||||
"success_message": "The HR Module is all set up!",
|
||||
"title": "Let's Setup the Human Resource Module. ",
|
||||
"user_can_dismiss": 0
|
||||
"subtitle": "Employee, Leaves, and more.",
|
||||
"success_message": "The Human Resource Module is all set up!",
|
||||
"title": "Let's Set Up the Human Resource Module. "
|
||||
}
|
||||
Reference in New Issue
Block a user