#33 | Add new custom js to see all IT Objects fileterd by location

This commit is contained in:
Jordi Albert 2022-09-12 11:01:57 +02:00
parent 399f5f8481
commit 3f10e77d93
2 changed files with 9 additions and 0 deletions

View File

@ -39,6 +39,8 @@ jenv = {
# doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"} # doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"}
# doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"} # doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"}
doctype_js = {"Location" : "public/js/location.js"}
# Home Pages # Home Pages
# ---------- # ----------

View 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}%`] })
})
}
});