show only submitted salary_structure and leave_policy in Employee Grade app (#15434)

* update staff plan when add or delete job-opening

* Update job_opening.py

* filter default_salary_structure and default_leave_policy

* merge
This commit is contained in:
Mohamed_Alsum
2018-09-25 15:26:17 +02:00
committed by Nabin Hait
parent 9c361c38f0
commit b9228fa443
3 changed files with 161 additions and 136 deletions

1
.gitignore vendored
View File

@@ -12,3 +12,4 @@ erpnext/docs/current
*.swo *.swo
__pycache__ __pycache__
*~ *~
.idea/

View File

@@ -2,7 +2,28 @@
// For license information, please see license.txt // For license information, please see license.txt
frappe.ui.form.on('Employee Grade', { frappe.ui.form.on('Employee Grade', {
refresh: function(frm) { refresh: function (frm) {
},
setup: function (frm) {
frm.set_query("default_salary_structure", function () {
return {
"filters": {
"docstatus": 1,
"is_active": "Yes"
}
};
});
frm.set_query("default_leave_policy", function () {
return {
"filters": {
"docstatus": 1
}
};
});
}
}
}); });

View File

@@ -15,6 +15,7 @@
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0, "allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
@@ -47,6 +48,7 @@
}, },
{ {
"allow_bulk_edit": 0, "allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
@@ -88,7 +90,7 @@
"issingle": 0, "issingle": 0,
"istable": 0, "istable": 0,
"max_attachments": 0, "max_attachments": 0,
"modified": "2018-04-13 16:14:24.174138", "modified": "2018-09-18 17:17:45.617624",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "HR", "module": "HR",
"name": "Employee Grade", "name": "Employee Grade",
@@ -153,12 +155,13 @@
"write": 1 "write": 1
} }
], ],
"quick_entry": 1, "quick_entry": 0,
"read_only": 0, "read_only": 0,
"read_only_onload": 0, "read_only_onload": 0,
"show_name_in_global_search": 0, "show_name_in_global_search": 0,
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC", "sort_order": "DESC",
"track_changes": 1, "track_changes": 1,
"track_seen": 0 "track_seen": 0,
"track_views": 0
} }