From ab2d7f7279ea1c28f1040b0331c12382ac00968b Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Sat, 31 Aug 2024 19:14:45 +0200 Subject: [PATCH] fix: show naming series only when needed --- erpnext/public/js/utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index 4e89e911132d..dbc08da4869f 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -20,7 +20,11 @@ $.extend(erpnext, { }, toggle_naming_series: function () { - if (cur_frm && cur_frm.fields_dict.naming_series) { + if ( + cur_frm && + cur_frm.fields_dict.naming_series && + cur_frm.meta.naming_rule == 'By "Naming Series" field' + ) { cur_frm.toggle_display("naming_series", cur_frm.doc.__islocal ? true : false); } },