Merge pull request #9463 from saurabh6790/v8_1_patch_fixes
[fix] patch fixes
This commit is contained in:
commit
dccceb44f9
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user