fix: Customize form issue where it remains "Not Saved" even after update
fixes: https://github.com/frappe/frappe/issues/16068
This commit is contained in:
parent
adb989fff2
commit
fedcf48ada
1 changed files with 4 additions and 5 deletions
|
|
@ -14,7 +14,6 @@ frappe.ui.form.on("Customize Form", {
|
|||
},
|
||||
|
||||
onload: function(frm) {
|
||||
frm.disable_save();
|
||||
frm.set_query("doc_type", function() {
|
||||
return {
|
||||
translate_values: false,
|
||||
|
|
@ -110,7 +109,7 @@ frappe.ui.form.on("Customize Form", {
|
|||
},
|
||||
|
||||
refresh: function(frm) {
|
||||
frm.disable_save();
|
||||
frm.disable_save(true);
|
||||
frm.page.clear_icons();
|
||||
|
||||
if (frm.doc.doc_type) {
|
||||
|
|
@ -169,7 +168,7 @@ frappe.ui.form.on("Customize Form", {
|
|||
doc_type = localStorage.getItem("customize_doctype");
|
||||
}
|
||||
if (doc_type) {
|
||||
setTimeout(() => frm.set_value("doc_type", doc_type), 1000);
|
||||
setTimeout(() => frm.set_value("doc_type", doc_type, false, true), 1000);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -341,11 +340,11 @@ frappe.customize_form.confirm = function(msg, frm) {
|
|||
}
|
||||
|
||||
frappe.customize_form.clear_locals_and_refresh = function(frm) {
|
||||
delete frm.doc.__unsaved;
|
||||
// clear doctype from locals
|
||||
frappe.model.clear_doc("DocType", frm.doc.doc_type);
|
||||
delete frappe.meta.docfield_copy[frm.doc.doc_type];
|
||||
|
||||
frm.refresh();
|
||||
}
|
||||
};
|
||||
|
||||
extend_cscript(cur_frm.cscript, new frappe.model.DocTypeController({frm: cur_frm}));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue