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