fix: flushing contact details, generating assignment rule issues
This commit is contained in:
parent
5c04b2eea4
commit
519a00ce44
@ -27,9 +27,6 @@ class Lead(SellingController):
|
|||||||
|
|
||||||
def after_insert(self):
|
def after_insert(self):
|
||||||
self.update_links()
|
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):
|
def validate(self):
|
||||||
self.set_lead_name()
|
self.set_lead_name()
|
||||||
@ -210,14 +207,6 @@ class Lead(SellingController):
|
|||||||
})
|
})
|
||||||
self.contact_doc.save()
|
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()
|
@frappe.whitelist()
|
||||||
def make_customer(source_name, target_doc=None):
|
def make_customer(source_name, target_doc=None):
|
||||||
return _make_customer(source_name, target_doc)
|
return _make_customer(source_name, target_doc)
|
||||||
|
Loading…
Reference in New Issue
Block a user