From 662b23ce570add7d7c5bbeadc0b6046fbfc98756 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 12 Feb 2018 19:25:00 +0530 Subject: [PATCH] get address display in customer --- erpnext/selling/doctype/customer/customer.js | 6 +++--- erpnext/selling/doctype/customer/customer.py | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js index 1994bd31e72..25c3cd22eca 100644 --- a/erpnext/selling/doctype/customer/customer.js +++ b/erpnext/selling/doctype/customer/customer.js @@ -47,11 +47,11 @@ frappe.ui.form.on("Customer", { frappe.call({ doc: frm.doc, args: { - "address_title":frm.doc.customer_primary_address + "address_title": frm.doc.customer_primary_address }, - method: 'get_display', + method: 'frappe.contacts.doctype.address.address.get_address_display', callback: function(r) { - frm.set_value("primary_address",r.message); + frm.set_value("primary_address", r.message); } }); } diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py index 518952f4244..6f25bf7fd6f 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -77,11 +77,6 @@ class Customer(TransactionBase): if self.flags.is_new_doc and self.get('address_line1'): make_address(self) - @classmethod - def get_display(self,address_title): - from frappe.contacts.doctype.address.address import get_address_display - return get_address_display(address_title) - def update_lead_status(self): '''If Customer created from Lead, update lead status to "Converted" update Customer link in Quotation, Opportunity'''