From f4e3643f741cf312b7f422789069246d481fb3b9 Mon Sep 17 00:00:00 2001 From: Hussain Nagaria Date: Thu, 19 Mar 2026 11:45:09 +0530 Subject: [PATCH] fix(CustomizeForm): don't show view list button for Child tables --- .../doctype/customize_form/customize_form.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/frappe/custom/doctype/customize_form/customize_form.js b/frappe/custom/doctype/customize_form/customize_form.js index 78e49939c0..e2ccfed8c7 100644 --- a/frappe/custom/doctype/customize_form/customize_form.js +++ b/frappe/custom/doctype/customize_form/customize_form.js @@ -107,13 +107,15 @@ frappe.ui.form.on("Customize Form", { frm.page.set_title(__("Customize Form - {0}", [__(frm.doc.doc_type)])); frappe.customize_form.set_primary_action(frm); - frm.add_custom_button( - __("Go to {0} List", [__(frm.doc.doc_type)]), - function () { - frappe.set_route("List", frm.doc.doc_type); - }, - __("Actions") - ); + if (!frappe.get_meta(frm.doc.doc_type).istable) { + frm.add_custom_button( + __("Go to {0} List", [__(frm.doc.doc_type)]), + () => { + frappe.set_route("List", frm.doc.doc_type); + }, + __("Actions") + ); + } frm.add_custom_button( __("Set Permissions"),