Merge pull request #250 from shariquerik/removed-hardcoded-values
fix: removed hardcoded values
This commit is contained in:
commit
7fab57a2ee
@ -339,10 +339,11 @@ def convert_to_deal(lead, doc=None):
|
|||||||
frappe.throw(_("Not allowed to convert Lead to Deal"), frappe.PermissionError)
|
frappe.throw(_("Not allowed to convert Lead to Deal"), frappe.PermissionError)
|
||||||
|
|
||||||
lead = frappe.get_cached_doc("CRM Lead", lead)
|
lead = frappe.get_cached_doc("CRM Lead", lead)
|
||||||
lead.status = "Qualified"
|
if frappe.db.exists("CRM Lead Status", "Qualified"):
|
||||||
|
lead.status = "Qualified"
|
||||||
lead.converted = 1
|
lead.converted = 1
|
||||||
if lead.sla:
|
if lead.sla and frappe.db.exists("CRM Communication Status", "Replied"):
|
||||||
lead.communication_status = 'Replied'
|
lead.communication_status = "Replied"
|
||||||
lead.save(ignore_permissions=True)
|
lead.save(ignore_permissions=True)
|
||||||
contact = lead.create_contact(False)
|
contact = lead.create_contact(False)
|
||||||
organization = lead.create_organization()
|
organization = lead.create_organization()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user