fix: cannot convert to deal
This commit is contained in:
parent
38cf406c05
commit
65cd4467b0
@ -249,6 +249,8 @@ def convert_to_deal(lead):
|
|||||||
lead = frappe.get_cached_doc("CRM Lead", lead)
|
lead = frappe.get_cached_doc("CRM Lead", lead)
|
||||||
lead.status = "Qualified"
|
lead.status = "Qualified"
|
||||||
lead.converted = 1
|
lead.converted = 1
|
||||||
|
if lead.sla:
|
||||||
|
lead.communication_status = 'Replied'
|
||||||
contact = lead.create_contact(False)
|
contact = lead.create_contact(False)
|
||||||
deal = lead.create_deal(contact)
|
deal = lead.create_deal(contact)
|
||||||
lead.save()
|
lead.save()
|
||||||
|
|||||||
@ -376,7 +376,6 @@ function getParsedFields(sections) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function convertToDeal() {
|
async function convertToDeal() {
|
||||||
updateField('communication_status', 'Replied')
|
|
||||||
let deal = await call('crm.fcrm.doctype.crm_lead.crm_lead.convert_to_deal', {
|
let deal = await call('crm.fcrm.doctype.crm_lead.crm_lead.convert_to_deal', {
|
||||||
lead: lead.data.name,
|
lead: lead.data.name,
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user