mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
Merge pull request #20604 from AnilPise/develop
fix: Parent Department filter while creating a new department
This commit is contained in:
@@ -2,6 +2,11 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('Department', {
|
frappe.ui.form.on('Department', {
|
||||||
|
onload: function(frm) {
|
||||||
|
frm.set_query("parent_department", function(){
|
||||||
|
return {"filters": [["Department", "is_group", "=", 1]]};
|
||||||
|
});
|
||||||
|
},
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
// read-only for root department
|
// read-only for root department
|
||||||
if(!frm.doc.parent_department && !frm.is_new()) {
|
if(!frm.doc.parent_department && !frm.is_new()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user