fix(doctype): disable allow_auto_repeat during duplication to prevent save failure

This commit is contained in:
Dharanidharan2813 2026-02-06 10:51:09 +05:30
parent d6daefb3a3
commit d6b5941c83

View file

@ -3,8 +3,11 @@
frappe.ui.form.on("DocType", {
onload: function (frm) {
if (frm.is_new() && !frm.doc?.fields) {
frappe.listview_settings["DocType"].new_doctype_dialog();
if (frm.is_new()) {
frm.set_value("allow_auto_repeat", 0);
if (!frm.doc?.fields) {
frappe.listview_settings["DocType"].new_doctype_dialog();
}
}
frm.call("check_pending_migration");
},