From f5374c182ee17daa94637e9211702e1701b7657f Mon Sep 17 00:00:00 2001 From: Jigar Tarpara Date: Fri, 17 Jan 2020 11:54:25 +0530 Subject: [PATCH] Bug Fix (#20330) * Bug Fix auto_close_after_days field is in Selling Settings * fix: close_opportunity_after_days field is in selling settings Co-authored-by: Nabin Hait --- 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 2880c8050e..5911db9f6c 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -307,7 +307,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