brotherton-erpnext/erpnext/patches/v12_0/set_lead_title_field.py
2022-03-28 18:52:46 +05:30

14 lines
196 B
Python

import frappe
def execute():
frappe.reload_doc("crm", "doctype", "lead")
frappe.db.sql(
"""
UPDATE
`tabLead`
SET
title = IF(organization_lead = 1, company_name, lead_name)
"""
)