mirror of
https://github.com/itsdave-de/msp.git
synced 2025-05-06 15:35:12 +02:00
#33 | Add new custom js to see all IT Objects fileterd by location
This commit is contained in:
parent
399f5f8481
commit
3f10e77d93
@ -39,6 +39,8 @@ jenv = {
|
||||
# doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"}
|
||||
# doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"}
|
||||
|
||||
doctype_js = {"Location" : "public/js/location.js"}
|
||||
|
||||
# Home Pages
|
||||
# ----------
|
||||
|
||||
|
7
msp/public/js/location.js
Normal file
7
msp/public/js/location.js
Normal file
@ -0,0 +1,7 @@
|
||||
frappe.ui.form.on('Location', {
|
||||
refresh(frm) {
|
||||
frm.add_custom_button('Show IT Objects in Location', () => {
|
||||
frappe.set_route('List', 'IT Object', { location_full_path: ['like', `%${frm.doc.location_name}%`] })
|
||||
})
|
||||
}
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user