From e950c4e642fd449632b25e5bf02d687f5094416a Mon Sep 17 00:00:00 2001 From: Corentin Forler Date: Thu, 24 Jul 2025 14:59:55 +0200 Subject: [PATCH] fix(event): Don't add Booking details if no perm --- erpnext/public/js/event.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/public/js/event.js b/erpnext/public/js/event.js index d082631ed8..7087899fe4 100644 --- a/erpnext/public/js/event.js +++ b/erpnext/public/js/event.js @@ -27,6 +27,9 @@ frappe.ui.form.on('Event', { }); }, add_item_booking_details(frm) { + if (!frappe.model.can_read("Item Booking")) { + return; + } frappe.model.with_doctype("Item Booking", () => { frappe.db.get_list('Item Booking', {filters: {event: frm.doc.name}, fields: ["name", "item_name", "color", "starts_on", "status"]}).then(data => { if (data.length) { -- GitLab