From 0a05dd44264812dcfdeaac7aca2dbb193f64c989 Mon Sep 17 00:00:00 2001 From: Jatin3128 <140256508+Jatin3128@users.noreply.github.com> Date: Thu, 2 Jul 2026 13:17:14 +0530 Subject: [PATCH] fix: restore Save button on reverse journal entry (#56770) Reversing a submitted Journal Entry opened a draft with reversal_of set, which called frm.set_read_only(). That strips the write and submit perms from frm.perm, so the toolbar never rendered the Save (or later Submit) button and the reversal could not be saved. Lock the fields and the accounts grid as read_only instead, leaving perms intact so Save and Submit still work while nothing stays editable. Ticket: 72857 --- erpnext/accounts/doctype/journal_entry/journal_entry.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js index 9713b11bfe7..ffe6630c725 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.js +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js @@ -29,7 +29,7 @@ frappe.ui.form.on("Journal Entry", { refresh(frm) { if (frm.doc.reversal_of && (frm.is_new() || frm.doc.docstatus == 0)) { - frm.set_read_only(); + erpnext.journal_entry.lock_reversal_entry(frm); } erpnext.toggle_naming_series(); @@ -232,6 +232,13 @@ Object.assign(erpnext.journal_entry, { } }, + lock_reversal_entry(frm) { + frm.fields + .filter((field) => field.has_input) + .forEach((field) => frm.set_df_property(field.df.fieldname, "read_only", 1)); + frm.set_df_property("accounts", "read_only", 1); + }, + add_custom_buttons(frm) { if (frm.doc.docstatus > 0) { frm.add_custom_button(