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