diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py index e2e21fa347..5c82142706 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py @@ -6,7 +6,7 @@ import frappe, os, json from frappe.utils import cstr from unidecode import unidecode -def create_charts(chart_name, company, ignore_permissions=False): +def create_charts(chart_name, company): chart = get_chart(chart_name) if chart: @@ -44,7 +44,7 @@ def create_charts(chart_name, company, ignore_permissions=False): if root_account or frappe.local.flags.allow_unverified_charts: account.flags.ignore_mandatory = True - account.flags.ignore_permissions = ignore_permissions + account.flags.ignore_permissions = True account.insert() diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index 22a33d0982..7da7c25d13 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -98,7 +98,7 @@ class Company(Document): "company": self.name, "create_account_under": stock_group }) - warehouse.flags.ignore_permissions = self.flags.ignore_permissions + warehouse.flags.ignore_permissions = True warehouse.insert() def create_default_accounts(self): @@ -106,7 +106,7 @@ class Company(Document): self.chart_of_accounts = "Standard" from erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts import create_charts - create_charts(self.chart_of_accounts, self.name, self.flags.ignore_permissions) + create_charts(self.chart_of_accounts, self.name) frappe.db.set(self, "default_receivable_account", frappe.db.get_value("Account", {"company": self.name, "account_type": "Receivable", "is_group": 0}))