fix: scrub "-" from fieldname in accounting dimension

(cherry picked from commit 023b7b9a60)
This commit is contained in:
ljain112
2024-10-23 18:13:42 +05:30
committed by Mergify
parent 87e0d2f7f4
commit c70282663c

View File

@@ -58,7 +58,7 @@ frappe.ui.form.on("Accounting Dimension", {
},
label: function (frm) {
frm.set_value("fieldname", frappe.model.scrub(frm.doc.label));
frm.set_value("fieldname", frm.doc.label.replace(/ /g, "_").replace(/-/g, "_").toLowerCase());
},
document_type: function (frm) {