From 48f11425233c4e3cce3c251efd5520b76323d622 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 24 Jun 2014 16:35:00 +0530 Subject: [PATCH] Fixed address deletion issue --- .../doctype/contact_control/contact_control.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/erpnext/setup/doctype/contact_control/contact_control.js b/erpnext/setup/doctype/contact_control/contact_control.js index 6b6878ffd5..b053541683 100755 --- a/erpnext/setup/doctype/contact_control/contact_control.js +++ b/erpnext/setup/doctype/contact_control/contact_control.js @@ -139,19 +139,10 @@ cur_frm.cscript.delete_doc = function(doctype, name) { var go_ahead = confirm(__("Delete {0} {1}?", [doctype, name])); if (!go_ahead) return; - return frappe.call({ - method: 'frappe.model.delete_doc', - args: { - dt: doctype, - dn: name - }, - callback: function(r) { - //console.log(r); - if (!r.exc) { - // run the correct list - var list_name = doctype.toLowerCase() + '_list'; - cur_frm[list_name].run(); - } + frappe.model.delete_doc(doctype, name, function(r) { + if (!r.exc) { + var list_name = doctype.toLowerCase() + '_list'; + cur_frm[list_name].run(); } }); }