fix: Use get_list instead of get_all to avoid perm issues
(cherry picked from commit 9507b2d752a40c0dd9e8b43ae3ef64435457c85e)
This commit is contained in:
parent
020f94532b
commit
a2b5e678fe
@ -192,7 +192,7 @@ def get_or_create_account(company_name, account):
|
|||||||
default_root_type = 'Liability'
|
default_root_type = 'Liability'
|
||||||
root_type = account.get('root_type', default_root_type)
|
root_type = account.get('root_type', default_root_type)
|
||||||
|
|
||||||
existing_accounts = frappe.get_list('Account',
|
existing_accounts = frappe.get_all('Account',
|
||||||
filters={
|
filters={
|
||||||
'company': company_name,
|
'company': company_name,
|
||||||
'root_type': root_type
|
'root_type': root_type
|
||||||
@ -247,7 +247,7 @@ def get_or_create_tax_group(company_name, root_type):
|
|||||||
|
|
||||||
# Create a new group account named 'Duties and Taxes' or 'Tax Assets' just
|
# Create a new group account named 'Duties and Taxes' or 'Tax Assets' just
|
||||||
# below the root account
|
# below the root account
|
||||||
root_account = frappe.get_list('Account', {
|
root_account = frappe.get_all('Account', {
|
||||||
'is_group': 1,
|
'is_group': 1,
|
||||||
'root_type': root_type,
|
'root_type': root_type,
|
||||||
'company': company_name,
|
'company': company_name,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user