From ed1a9e15591b7e8d4e1053fd97e528bbfb9cc43d Mon Sep 17 00:00:00 2001 From: hasnain2808 Date: Thu, 13 May 2021 09:55:27 +0530 Subject: [PATCH] fix: do not show counter on unsaved forms --- .../core/doctype/document_naming_rule/document_naming_rule.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/core/doctype/document_naming_rule/document_naming_rule.js b/frappe/core/doctype/document_naming_rule/document_naming_rule.js index e837ca2d6c..23a22ee33c 100644 --- a/frappe/core/doctype/document_naming_rule/document_naming_rule.js +++ b/frappe/core/doctype/document_naming_rule/document_naming_rule.js @@ -4,7 +4,7 @@ frappe.ui.form.on('Document Naming Rule', { refresh: function(frm) { frm.trigger('document_type'); - frm.trigger("add_button"); + if(!frm.doc.__islocal) frm.trigger("add_button"); }, document_type: (frm) => { // update the select field options with fieldnames