optimize(various)

This commit is contained in:
Rushabh Mehta
2018-08-08 16:37:31 +05:30
parent 4d0b8da0e5
commit 708e47aadf
90 changed files with 254 additions and 250 deletions

View File

@@ -56,7 +56,7 @@ def get_parent_account(company, master_type):
parent_account = None
if "receivables_group" in frappe.db.get_table_columns("Company"):
parent_account = frappe.db.get_value("Company", company,
parent_account = frappe.get_cached_value('Company', company,
"receivables_group" if master_type=="Customer" else "payables_group")
if not parent_account:
parent_account = frappe.db.get_value("Account", {"company": company,