fix: do not show counter on unsaved forms

This commit is contained in:
hasnain2808 2021-05-13 09:55:27 +05:30
parent bb4be32751
commit ed1a9e1559

View file

@ -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