Files
schuetz3-erpnext/erpnext/patches/v14_0/enable_all_leads.py
Komal-Saraf0609 5e98679f91 fix: enabling lead even after "Opportunity" created against it (#34627)
* fix: enabling lead even after "Opportunity" created against it

* chore: Linting Issues

---------

Co-authored-by: Komal Saraf <komal@frappe.io>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
(cherry picked from commit ad11934d39)

# Conflicts:
#	erpnext/patches.txt
#	erpnext/patches/v14_0/enable_all_leads.py
2023-03-30 02:34:48 +00:00

9 lines
195 B
Python

import frappe
def execute():
lead = frappe.qb.DocType("Lead")
frappe.qb.update(lead).set(lead.disabled, 0).set(lead.docstatus, 0).where(
lead.disabled == 1 and lead.docstatus == 1
).run()