Merge branch 'master' into develop

This commit is contained in:
mbauskar 2017-07-18 16:38:24 +05:30
commit d36c136fc6
3 changed files with 4 additions and 4 deletions

View File

@ -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'''

View File

@ -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(('''

View File

@ -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