fix: added validation to if account is being added to child company

This commit is contained in:
Zlash65
2019-01-30 11:12:28 +05:30
committed by Rohit Waghchaure
parent 0407bf1e00
commit 88c990901d
2 changed files with 15 additions and 0 deletions

View File

@@ -141,6 +141,7 @@ class Company(NestedSet):
def create_default_accounts(self):
from erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts import create_charts
frappe.local.flags.ignore_root_company_validation = True
create_charts(self.name, self.chart_of_accounts, self.existing_company)
frappe.db.set(self, "default_receivable_account", frappe.db.get_value("Account",