mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 09:54:47 +00:00
patch: set title for old leads
This commit is contained in:
11
erpnext/patches/v12_0/set_lead_title_field.py
Normal file
11
erpnext/patches/v12_0/set_lead_title_field.py
Normal file
@@ -0,0 +1,11 @@
|
||||
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)
|
||||
""")
|
||||
Reference in New Issue
Block a user