From 702c6e00daf490bc23d9ab2b64bfb649d9b66117 Mon Sep 17 00:00:00 2001 From: Anurag Mishra Date: Tue, 26 Mar 2019 16:00:43 +0530 Subject: [PATCH] fix: route on loan Disbursement and Closing --- .../doctype/invoice_discounting/invoice_discounting.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.js b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.js index e63bc50f3c..328df4f813 100644 --- a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.js +++ b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.js @@ -148,7 +148,8 @@ frappe.ui.form.on('Invoice Discounting', { doc: frm.doc, callback: function(r) { if(!r.exc){ - frappe.set_route("Form", r.message.doctype, r.message.name); + var doclist = frappe.model.sync(r.message); + frappe.set_route("Form", doclist[0].doctype, doclist[0].name); } } }); @@ -161,7 +162,8 @@ frappe.ui.form.on('Invoice Discounting', { doc: frm.doc, callback: function(r) { if(!r.exc){ - frappe.set_route("Form", r.message.doctype, r.message.name); + var doclist = frappe.model.sync(r.message); + frappe.set_route("Form", doclist[0].doctype, doclist[0].name); } } });