fix: old doc not found error when renaming doc
This commit is contained in:
parent
5e6283f33d
commit
224a80aa9d
2 changed files with 3 additions and 4 deletions
|
|
@ -381,7 +381,7 @@ frappe.ui.form.Dashboard = class FormDashboard {
|
|||
method: method,
|
||||
args: {
|
||||
doctype: this.frm.doctype,
|
||||
name: this.frm.doc.name,
|
||||
name: this.frm.docname,
|
||||
items: items
|
||||
},
|
||||
callback: function(r) {
|
||||
|
|
@ -681,7 +681,7 @@ class Section {
|
|||
this.set_icon(hide);
|
||||
|
||||
// save state for next reload ('' is falsy)
|
||||
localStorage.setItem(this.df.css_class + '-closed', hide ? '1' : '');
|
||||
localStorage.setItem(this.df.css_class + '-closed', hide ? '1' : '');
|
||||
}
|
||||
|
||||
set_icon(hide) {
|
||||
|
|
@ -700,4 +700,4 @@ class Section {
|
|||
show() {
|
||||
this.wrapper.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -621,7 +621,6 @@ $.extend(frappe.model, {
|
|||
r.message || args.new_name]);
|
||||
if(locals[doctype] && locals[doctype][docname])
|
||||
delete locals[doctype][docname];
|
||||
this.frm.reload_doc();
|
||||
d.hide();
|
||||
if(callback)
|
||||
callback(r.message);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue