get address display in customer

This commit is contained in:
Nabin Hait
2018-02-12 19:25:00 +05:30
parent 4adcced9ae
commit 662b23ce57
2 changed files with 3 additions and 8 deletions

View File

@@ -47,11 +47,11 @@ frappe.ui.form.on("Customer", {
frappe.call({ frappe.call({
doc: frm.doc, doc: frm.doc,
args: { 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) { callback: function(r) {
frm.set_value("primary_address",r.message); frm.set_value("primary_address", r.message);
} }
}); });
} }

View File

@@ -77,11 +77,6 @@ class Customer(TransactionBase):
if self.flags.is_new_doc and self.get('address_line1'): if self.flags.is_new_doc and self.get('address_line1'):
make_address(self) 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): def update_lead_status(self):
'''If Customer created from Lead, update lead status to "Converted" '''If Customer created from Lead, update lead status to "Converted"
update Customer link in Quotation, Opportunity''' update Customer link in Quotation, Opportunity'''