Merge pull request #23441 from anupamvs/lead-contact-detail
fix: flushing contact details, generates assignment rule issues
diff --git a/erpnext/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py
index 315d298..31db569 100644
--- a/erpnext/crm/doctype/lead/lead.py
+++ b/erpnext/crm/doctype/lead/lead.py
@@ -27,9 +27,6 @@
def after_insert(self):
self.update_links()
- # after the address and contact are created, flush the field values
- # to avoid inconsistent reporting in case the documents are changed
- self.flush_address_and_contact_fields()
def validate(self):
self.set_lead_name()
@@ -210,14 +207,6 @@
})
self.contact_doc.save()
- def flush_address_and_contact_fields(self):
- fields = ['address_type', 'address_line1', 'address_line2', 'address_title',
- 'city', 'county', 'country', 'fax', 'pincode', 'state']
-
- for field in fields:
- self.set(field, None)
-
-
@frappe.whitelist()
def make_customer(source_name, target_doc=None):
return _make_customer(source_name, target_doc)