Merge branch 'develop'

This commit is contained in:
Saurabh 2017-06-26 13:55:59 +05:30
commit f4fc30a72d
4 changed files with 9 additions and 4 deletions

View File

@ -2,7 +2,7 @@
from __future__ import unicode_literals
import frappe
__version__ = '8.1.2'
__version__ = '8.1.3'
def get_default_company(user=None):

View File

@ -21,7 +21,7 @@ def execute():
condition = ""
company = erpnext.get_default_company()
if company:
condition = " and name='{0}'".format(company)
condition = " and name='{0}'".format(frappe.db.escape(company))
domains = frappe.db.sql_list("select distinct domain from `tabCompany` where domain != 'Other' {0}".format(condition))

View File

@ -10,4 +10,4 @@ def execute():
for data in frappe.get_all('Company', fields = ["name"]):
doc = frappe.get_doc('Company', data.name)
doc.enable_perpetual_inventory = enabled
doc.save(ignore_permissions=True)
doc.db_update()

View File

@ -3,6 +3,7 @@
from __future__ import unicode_literals
import frappe
from frappe.utils import cint
def execute():
"""
@ -10,6 +11,10 @@ def execute():
"""
frappe.reload_doc("core", "doctype", "system_settings")
doc = frappe.get_doc("System Settings", "System Settings")
doc = frappe.get_doc("System Settings")
doc.flags.ignore_mandatory = True
if cint(doc.currency_precision) == 0:
doc.currency_precision = ''
doc.save(ignore_permissions=True)