[fix][awesomebar] remove saved new doc entries (#3673)
This commit is contained in:
parent
406155750d
commit
bb861f4a50
1 changed files with 14 additions and 1 deletions
|
|
@ -176,6 +176,8 @@ frappe.ui.form.save = function (frm, action, callback, btn) {
|
|||
console.log("Already saving. Please wait a few moments.")
|
||||
throw "saving";
|
||||
}
|
||||
|
||||
frappe.ui.form.remove_old_form_route();
|
||||
frappe.ui.form.is_saving = true;
|
||||
|
||||
return frappe.call({
|
||||
|
|
@ -206,7 +208,18 @@ frappe.ui.form.save = function (frm, action, callback, btn) {
|
|||
}
|
||||
}
|
||||
|
||||
frappe.ui.form.update_calling_link = function (newdoc) {
|
||||
frappe.ui.form.remove_old_form_route = () => {
|
||||
let index = -1;
|
||||
let current_route = frappe.get_route();
|
||||
frappe.route_history.map((arr, i) => {
|
||||
if (arr.join("/") === current_route.join("/")) {
|
||||
index = i;
|
||||
}
|
||||
});
|
||||
frappe.route_history.splice(index, 1);
|
||||
}
|
||||
|
||||
frappe.ui.form.update_calling_link = (newdoc) => {
|
||||
if (frappe._from_link && newdoc.doctype === frappe._from_link.df.options) {
|
||||
var doc = frappe.get_doc(frappe._from_link.doctype, frappe._from_link.docname);
|
||||
// set value
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue