From 15963525853ddeddad23a9eb90a2a08d9513d839 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 17 Jan 2020 15:59:02 +0530 Subject: [PATCH] fix: close_opportunity_after_days field is in selling settings (#20334) --- erpnext/crm/doctype/opportunity/opportunity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index 4e0eebd0de9..12f8fb95ff4 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -308,7 +308,7 @@ def set_multiple_status(names, status): def auto_close_opportunity(): """ auto close the `Replied` Opportunities after 7 days """ - auto_close_after_days = frappe.db.get_value("Support Settings", "Support Settings", "close_opportunity_after_days") or 15 + auto_close_after_days = frappe.db.get_single_value("Selling Settings", "close_opportunity_after_days") or 15 opportunities = frappe.db.sql(""" select name from tabOpportunity where status='Replied' and modified