From 1604c216026d1138e4e9c71e0dfef1febe6a6402 Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Thu, 9 Apr 2026 12:53:12 +0530 Subject: [PATCH] fix(list_opportunity_report): parameterized `lost_reason` (#54160) --- erpnext/crm/report/lost_opportunity/lost_opportunity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/crm/report/lost_opportunity/lost_opportunity.py b/erpnext/crm/report/lost_opportunity/lost_opportunity.py index eb09711667a..1f826fe227a 100644 --- a/erpnext/crm/report/lost_opportunity/lost_opportunity.py +++ b/erpnext/crm/report/lost_opportunity/lost_opportunity.py @@ -117,7 +117,7 @@ def get_join(filters): join = """JOIN `tabOpportunity Lost Reason Detail` ON `tabOpportunity Lost Reason Detail`.parenttype = 'Opportunity' and `tabOpportunity Lost Reason Detail`.parent = `tabOpportunity`.name and - `tabOpportunity Lost Reason Detail`.lost_reason = '{}' - """.format(filters.get("lost_reason")) + `tabOpportunity Lost Reason Detail`.lost_reason=%(lost_reason)s + """ return join