mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-13 14:41:53 +00:00
fix: allow non-admin roles to import chart of accounts (#57454)
This commit is contained in:
committed by
GitHub
parent
39403a5ef3
commit
89e2c3c3e5
@@ -461,16 +461,12 @@ def unset_existing_data(company):
|
||||
frappe.db.set_value("Company", company, update_values, update_values)
|
||||
|
||||
# remove accounts data from various doctypes
|
||||
for doctype in [
|
||||
"Account",
|
||||
"Party Account",
|
||||
"Mode of Payment Account",
|
||||
"Tax Withholding Account",
|
||||
"Sales Taxes and Charges Template",
|
||||
"Purchase Taxes and Charges Template",
|
||||
]:
|
||||
for doctype in ["Account", "Sales Taxes and Charges Template", "Purchase Taxes and Charges Template"]:
|
||||
frappe.get_query(doctype, delete=True, filters={"company": company}, ignore_permissions=False).run()
|
||||
|
||||
for doctype in ["Party Account", "Mode of Payment Account", "Tax Withholding Account"]:
|
||||
frappe.get_query(doctype, delete=True, filters={"company": company}, ignore_permissions=True).run()
|
||||
|
||||
|
||||
def set_default_accounts(company):
|
||||
from erpnext.setup.doctype.company.company import install_country_fixtures
|
||||
|
||||
Reference in New Issue
Block a user