mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-16 16:15:02 +00:00
fix: Use get_list instead of get_all to avoid perm issues
This commit is contained in:
@@ -202,7 +202,7 @@ def get_or_create_account(company_name, account):
|
||||
default_root_type = 'Liability'
|
||||
root_type = account.get('root_type', default_root_type)
|
||||
|
||||
existing_accounts = frappe.get_list('Account',
|
||||
existing_accounts = frappe.get_all('Account',
|
||||
filters={
|
||||
'company': company_name,
|
||||
'root_type': root_type
|
||||
@@ -257,7 +257,7 @@ def get_or_create_tax_group(company_name, root_type):
|
||||
|
||||
# Create a new group account named 'Duties and Taxes' or 'Tax Assets' just
|
||||
# below the root account
|
||||
root_account = frappe.get_list('Account', {
|
||||
root_account = frappe.get_all('Account', {
|
||||
'is_group': 1,
|
||||
'root_type': root_type,
|
||||
'company': company_name,
|
||||
|
||||
Reference in New Issue
Block a user