Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabh6790 committed Jun 26, 2017
2 parents 81bb2c9 + 095701e commit f4fc30a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion erpnext/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion erpnext/patches/v8_0/create_domain_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
2 changes: 1 addition & 1 deletion erpnext/patches/v8_0/move_perpetual_inventory_setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
7 changes: 6 additions & 1 deletion erpnext/patches/v8_0/save_system_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@

from __future__ import unicode_literals
import frappe
from frappe.utils import cint

def execute():
"""
save system settings document
"""

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)

0 comments on commit f4fc30a

Please sign in to comment.