From 467609b19316ee8c1444aea4b19ca552397beaef Mon Sep 17 00:00:00 2001 From: ashish-greycube Date: Fri, 26 Apr 2019 11:35:04 +0530 Subject: [PATCH 1/2] show only party_type doctypes in Party Type field of bank account --- erpnext/accounts/doctype/bank_account/bank_account.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/accounts/doctype/bank_account/bank_account.js b/erpnext/accounts/doctype/bank_account/bank_account.js index 5ac41e4452..a3f16e4b03 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account.js +++ b/erpnext/accounts/doctype/bank_account/bank_account.js @@ -12,6 +12,11 @@ frappe.ui.form.on('Bank Account', { } }; }); + frm.set_query("party_type", function() { + return { + query: "erpnext.setup.doctype.party_type.party_type.get_party_type", + } + }); }, refresh: function(frm) { frappe.dynamic_link = { doc: frm.doc, fieldname: 'name', doctype: 'Bank Account' } From e4e8197f463e489464715473e76407adb83cdafa Mon Sep 17 00:00:00 2001 From: ashish-greycube Date: Fri, 26 Apr 2019 14:06:21 +0530 Subject: [PATCH 2/2] codacy review --- erpnext/accounts/doctype/bank_account/bank_account.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/bank_account/bank_account.js b/erpnext/accounts/doctype/bank_account/bank_account.js index a3f16e4b03..a7b5891cff 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account.js +++ b/erpnext/accounts/doctype/bank_account/bank_account.js @@ -15,7 +15,7 @@ frappe.ui.form.on('Bank Account', { frm.set_query("party_type", function() { return { query: "erpnext.setup.doctype.party_type.party_type.get_party_type", - } + }; }); }, refresh: function(frm) {