fix: Unable to import COA through importer

This commit is contained in:
Deepesh Garg 2022-12-16 19:22:29 +05:30
parent b179514273
commit 3b66920342
2 changed files with 4 additions and 3 deletions

View File

@ -485,6 +485,10 @@ def set_default_accounts(company):
"default_payable_account": frappe.db.get_value( "default_payable_account": frappe.db.get_value(
"Account", {"company": company.name, "account_type": "Payable", "is_group": 0} "Account", {"company": company.name, "account_type": "Payable", "is_group": 0}
), ),
"default_provisional_account": frappe.db.get_value(
"Account",
{"company": company.name, "account_type": "Service Received But Not Billed", "is_group": 0},
),
} }
) )

View File

@ -70,9 +70,6 @@ class Company(NestedSet):
self.abbr = self.abbr.strip() self.abbr = self.abbr.strip()
# if self.get('__islocal') and len(self.abbr) > 5:
# frappe.throw(_("Abbreviation cannot have more than 5 characters"))
if not self.abbr.strip(): if not self.abbr.strip():
frappe.throw(_("Abbreviation is mandatory")) frappe.throw(_("Abbreviation is mandatory"))