From 690a93957230438510df2e1ade3febe4bde31c31 Mon Sep 17 00:00:00 2001 From: Imesha Sudasingha Date: Mon, 24 Mar 2025 12:37:52 +0000 Subject: [PATCH 1/2] fix: assign dialog instance to a variable in update_child_items function `dialog` is being referred in `onchange` handlers of the fields. Without this fix, they are failing because `dialog` is not defined. --- erpnext/public/js/utils.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index c2b068b6e62..dc25a7bed57 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -750,7 +750,7 @@ erpnext.utils.update_child_items = function (opts) { }); } - new frappe.ui.Dialog({ + let dialog = new frappe.ui.Dialog({ title: __("Update Items"), size: "extra-large", fields: [ @@ -787,7 +787,9 @@ erpnext.utils.update_child_items = function (opts) { refresh_field("items"); }, primary_action_label: __("Update"), - }).show(); + }); + + dialog.show(); }; erpnext.utils.map_current_doc = function (opts) { From df64d2ef4ead4d414a30d0147cec1b035daaa178 Mon Sep 17 00:00:00 2001 From: Imesha Sudasingha Date: Mon, 24 Mar 2025 12:50:48 +0000 Subject: [PATCH 2/2] fix: fix lint issues with trailing whitespaces --- erpnext/public/js/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index dc25a7bed57..44cd291004b 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -788,7 +788,7 @@ erpnext.utils.update_child_items = function (opts) { }, primary_action_label: __("Update"), }); - + dialog.show(); };