Fixed address deletion issue
This commit is contained in:
parent
d0bf91d639
commit
e9b95bbfe8
@ -139,20 +139,11 @@ cur_frm.cscript.delete_doc = function(doctype, name) {
|
|||||||
var go_ahead = confirm(__("Delete {0} {1}?", [doctype, name]));
|
var go_ahead = confirm(__("Delete {0} {1}?", [doctype, name]));
|
||||||
if (!go_ahead) return;
|
if (!go_ahead) return;
|
||||||
|
|
||||||
return frappe.call({
|
frappe.model.delete_doc(doctype, name, function(r) {
|
||||||
method: 'frappe.model.delete_doc',
|
|
||||||
args: {
|
|
||||||
dt: doctype,
|
|
||||||
dn: name
|
|
||||||
},
|
|
||||||
callback: function(r) {
|
|
||||||
//console.log(r);
|
|
||||||
if (!r.exc) {
|
if (!r.exc) {
|
||||||
// run the correct list
|
|
||||||
var list_name = doctype.toLowerCase() + '_list';
|
var list_name = doctype.toLowerCase() + '_list';
|
||||||
cur_frm[list_name].run();
|
cur_frm[list_name].run();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user