From 216015f49ebac5d590c953d1aa1002d2a73cfc19 Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Thu, 4 Jul 2024 17:28:48 +0530 Subject: [PATCH] fix: Revert "fix: refresh fields after changing form to read-only (#26439)" This reverts commit cc8c0f917cefb3eebc2b4a2c7ebba2a8a768763a. This also reverts the attemped fix: #26983 Signed-off-by: Akhil Narang --- frappe/public/js/frappe/form/form.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frappe/public/js/frappe/form/form.js b/frappe/public/js/frappe/form/form.js index ee7f141127..5410b1caec 100644 --- a/frappe/public/js/frappe/form/form.js +++ b/frappe/public/js/frappe/form/form.js @@ -671,7 +671,7 @@ frappe.ui.form.Form = class FrappeForm { } refresh_fields() { - this?.layout?.refresh(this.doc); + this.layout.refresh(this.doc); this.layout.primary_button = this.$wrapper.find(".btn-primary"); // cleanup activities after refresh @@ -1843,7 +1843,6 @@ frappe.ui.form.Form = class FrappeForm { email: p.email, }; }); - this.refresh_fields(); } trigger(event, doctype, docname) {