mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 04:59:18 +00:00
Merge branch 'develop'
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
__version__ = '8.1.2'
|
__version__ = '8.1.3'
|
||||||
|
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ def execute():
|
|||||||
condition = ""
|
condition = ""
|
||||||
company = erpnext.get_default_company()
|
company = erpnext.get_default_company()
|
||||||
if 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))
|
domains = frappe.db.sql_list("select distinct domain from `tabCompany` where domain != 'Other' {0}".format(condition))
|
||||||
|
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ def execute():
|
|||||||
for data in frappe.get_all('Company', fields = ["name"]):
|
for data in frappe.get_all('Company', fields = ["name"]):
|
||||||
doc = frappe.get_doc('Company', data.name)
|
doc = frappe.get_doc('Company', data.name)
|
||||||
doc.enable_perpetual_inventory = enabled
|
doc.enable_perpetual_inventory = enabled
|
||||||
doc.save(ignore_permissions=True)
|
doc.db_update()
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
from frappe.utils import cint
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
"""
|
"""
|
||||||
@@ -10,6 +11,10 @@ def execute():
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
frappe.reload_doc("core", "doctype", "system_settings")
|
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
|
doc.flags.ignore_mandatory = True
|
||||||
|
|
||||||
|
if cint(doc.currency_precision) == 0:
|
||||||
|
doc.currency_precision = ''
|
||||||
|
|
||||||
doc.save(ignore_permissions=True)
|
doc.save(ignore_permissions=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user