From 70d972d92e37845006fae52924d4c2b6c1c414dd Mon Sep 17 00:00:00 2001 From: Saurabh Date: Fri, 2 Feb 2018 16:18:17 +0530 Subject: [PATCH] [Mod] Added descriptions to alert about reselecting the option in 'primary_address_and_contact_detail' --- erpnext/selling/doctype/customer/customer.json | 4 +++- erpnext/selling/doctype/customer/customer.py | 11 ----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json index 0ab3b3b1bf..2c846cf0c9 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 b0c04e601e..6f25bf7fd6 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -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: