Merge pull request #23441 from anupamvs/lead-contact-detail

fix: flushing contact details, generates assignment rule issues
This commit is contained in:
rohitwaghchaure 2020-09-28 13:30:09 +05:30 committed by GitHub
commit 7b2f141d0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,9 +27,6 @@ class Lead(SellingController):
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 @@ class Lead(SellingController):
})
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)