[Mod] Dependant on complete_address field and loads updated mobile_no,address in onload method

This commit is contained in:
Saurabh 2018-02-01 14:38:17 +05:30
parent df8add272c
commit 7c8d508e28
2 changed files with 3 additions and 4 deletions

View File

@ -922,7 +922,7 @@
"label": "Primary Address", "label": "Primary Address",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
"options": "", "options": "customer_primary_address.complete_address",
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
"print_hide": 0, "print_hide": 0,
@ -1447,7 +1447,7 @@
"issingle": 0, "issingle": 0,
"istable": 0, "istable": 0,
"max_attachments": 0, "max_attachments": 0,
"modified": "2018-01-31 16:44:52.191083", "modified": "2018-02-01 14:36:29.376438",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Customer", "name": "Customer",

View File

@ -54,7 +54,6 @@ class Customer(TransactionBase):
self.flags.old_lead = self.lead_name self.flags.old_lead = self.lead_name
validate_party_accounts(self) validate_party_accounts(self)
self.validate_credit_limit_on_change() self.validate_credit_limit_on_change()
self.fetch_primary_address_and_contact_detail()
def on_update(self): def on_update(self):
self.validate_name_with_customer_group() self.validate_name_with_customer_group()
@ -75,7 +74,7 @@ class Customer(TransactionBase):
if(self.customer_primary_address): if(self.customer_primary_address):
primary_address_doc = frappe.get_doc("Address",self.customer_primary_address) primary_address_doc = frappe.get_doc("Address",self.customer_primary_address)
self.primary_address = "<br>" + primary_address_doc.get_display() self.primary_address = primary_address_doc.complete_address
def create_primary_contact(self): def create_primary_contact(self):
if not self.customer_primary_contact and not self.lead_name: if not self.customer_primary_contact and not self.lead_name: