[Mod] Added descriptions to alert about reselecting the option in 'primary_address_and_contact_detail'
diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json
index 0ab3b3b..2c846cf 100644
--- a/erpnext/selling/doctype/customer/customer.json
+++ b/erpnext/selling/doctype/customer/customer.json
@@ -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",
diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py
index b0c04e6..6f25bf7 100644
--- a/erpnext/selling/doctype/customer/customer.py
+++ b/erpnext/selling/doctype/customer/customer.py
@@ -20,7 +20,6 @@
"""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 @@
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: