diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 9f37fbb5f67..645fc69e047 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from erpnext.hooks import regional_overrides -__version__ = '8.5.1' +__version__ = '8.5.2' def get_default_company(user=None): '''Get default company for user''' diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index a11f3acb189..c8a0507e8e5 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -339,7 +339,7 @@ def update_company_monthly_sales(company): '''Cache past year monthly sales of every company based on sales invoices''' from frappe.utils.goal import get_monthly_results import json - filter_str = 'company = "'+ company +'" and status != "Draft"' + filter_str = "company = '{0}' and status != 'Draft'".format(frappe.db.escape(company)) month_to_value_dict = get_monthly_results("Sales Invoice", "grand_total", "posting_date", filter_str, "sum") frappe.db.sql((''' diff --git a/erpnext/setup/setup_wizard/domainify.py b/erpnext/setup/setup_wizard/domainify.py index 90878af75cc..7f333cc8150 100644 --- a/erpnext/setup/setup_wizard/domainify.py +++ b/erpnext/setup/setup_wizard/domainify.py @@ -157,8 +157,8 @@ def update_module_def_restrict_to_domain(): lang = frappe.db.get_single_value("System Settings", "language") or "en" for module, domain in module_def_restrict_to_domain_mapper.iteritems(): if frappe.db.exists("Domain", _(domain, lang)): - frappe.set_value("Module Def", module, "restrict_to_domain", _(domain, lang)) + frappe.db.set_value("Module Def", module, "restrict_to_domain", _(domain, lang)) elif frappe.db.exists("Domain", domain): - frappe.set_value("Module Def", module, "restrict_to_domain", domain) + frappe.db.set_value("Module Def", module, "restrict_to_domain", domain) else: pass