From 187c74ae0928de27d91cd453fc11a97d4797fbba Mon Sep 17 00:00:00 2001 From: Sanket322 Date: Fri, 27 Dec 2024 12:53:41 +0530 Subject: [PATCH] fix: use meta to check field instead of doctype --- erpnext/public/js/controllers/buying.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js index c2c86fca960..5a8b63f601f 100644 --- a/erpnext/public/js/controllers/buying.js +++ b/erpnext/public/js/controllers/buying.js @@ -146,7 +146,7 @@ erpnext.buying = { } company(){ - if(this.frm.doc.doctype == "Material Request") return; + if(!frappe.meta.has_field(this.frm.doc.doctype, "billing_address")) return; frappe.call({ method: "erpnext.setup.doctype.company.company.get_default_company_address",