[Mod] Added descriptions to alert about reselecting the option in 'primary_address_and_contact_detail'
This commit is contained in:
parent
7c8d508e28
commit
70d972d92e
@ -756,6 +756,7 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"description": "Reselect, if the chosen contact is edited after save",
|
||||
"fieldname": "customer_primary_contact",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
@ -878,6 +879,7 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"description": "Reselect, if the chosen address is edited after save",
|
||||
"fieldname": "customer_primary_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
@ -1447,7 +1449,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-02-01 14:36:29.376438",
|
||||
"modified": "2018-02-02 16:07:11.052268",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Customer",
|
||||
|
@ -20,7 +20,6 @@ class Customer(TransactionBase):
|
||||
"""Load address and contacts in `__onload`"""
|
||||
load_address_and_contact(self)
|
||||
self.load_dashboard_info()
|
||||
self.fetch_primary_address_and_contact_detail()
|
||||
|
||||
def load_dashboard_info(self):
|
||||
info = get_dashboard_info(self.doctype, self.name)
|
||||
@ -66,16 +65,6 @@ class Customer(TransactionBase):
|
||||
if self.flags.is_new_doc:
|
||||
self.create_lead_address_contact()
|
||||
|
||||
def fetch_primary_address_and_contact_detail(self):
|
||||
if(self.customer_primary_contact):
|
||||
primary_contact_doc = frappe.get_doc("Contact",self.customer_primary_contact)
|
||||
self.mobile_no = primary_contact_doc.mobile_no
|
||||
self.email_id = primary_contact_doc.email_id
|
||||
|
||||
if(self.customer_primary_address):
|
||||
primary_address_doc = frappe.get_doc("Address",self.customer_primary_address)
|
||||
self.primary_address = primary_address_doc.complete_address
|
||||
|
||||
def create_primary_contact(self):
|
||||
if not self.customer_primary_contact and not self.lead_name:
|
||||
if self.mobile_no or self.email_id:
|
||||
|
Loading…
x
Reference in New Issue
Block a user