[fix] setup chart of accounts
This commit is contained in:
parent
47118ab72a
commit
b274f8cb2a
@ -336,9 +336,13 @@ def install_company(args):
|
|||||||
# Company
|
# Company
|
||||||
{
|
{
|
||||||
"doctype":"Company",
|
"doctype":"Company",
|
||||||
'company_name': args.company_name, 'enable_perpetual_inventory': 1,
|
'company_name': args.company_name,
|
||||||
'abbr': args.company_abbr, 'default_currency': args.currency, 'country': args.country,
|
'enable_perpetual_inventory': 1,
|
||||||
|
'abbr': args.company_abbr,
|
||||||
|
'default_currency': args.currency,
|
||||||
|
'country': args.country,
|
||||||
'create_chart_of_accounts_based_on': 'Standard Template',
|
'create_chart_of_accounts_based_on': 'Standard Template',
|
||||||
|
'chart_of_accounts': args.chart_of_accounts,
|
||||||
'domain': args.domain
|
'domain': args.domain
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -367,6 +371,7 @@ def install_post_company_fixtures(args=None):
|
|||||||
|
|
||||||
make_records(records)
|
make_records(records)
|
||||||
|
|
||||||
|
|
||||||
def install_defaults(args=None):
|
def install_defaults(args=None):
|
||||||
records = [
|
records = [
|
||||||
# Price Lists
|
# Price Lists
|
||||||
@ -435,32 +440,10 @@ def install_defaults(args=None):
|
|||||||
# bank account same as a CoA entry
|
# bank account same as a CoA entry
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
# Now, with fixtures out of the way, onto concrete stuff
|
# Now, with fixtures out of the way, onto concrete stuff
|
||||||
records = [
|
records = [
|
||||||
# # Bank Account
|
|
||||||
# {
|
|
||||||
# "doctype": "Account",
|
|
||||||
# "__condition": lambda: c.bank_account and frappe.db.get_value("Account",
|
|
||||||
# {"account_type": "Bank", "is_group": 1, "root_type": "Asset",
|
|
||||||
# "company": c.company_name}),
|
|
||||||
|
|
||||||
# "__exception": {
|
# Shopping cart: needs price lists
|
||||||
# "exception": RootNotEditable,
|
|
||||||
# "handler": lambda: frappe.throw(_("Bank account cannot be named as {0}").format(config.get("bank_account")))
|
|
||||||
# },
|
|
||||||
# 'account_name': c.bank_account,
|
|
||||||
|
|
||||||
# 'parent_account': lambda: frappe.db.get_value("Account",
|
|
||||||
# {"account_type": "Bank", "is_group": 1, "root_type": "Asset",
|
|
||||||
# "company": c.company_name}),
|
|
||||||
|
|
||||||
# 'is_group':0,
|
|
||||||
# 'company': c.company_name,
|
|
||||||
# "account_type": "Bank",
|
|
||||||
# },
|
|
||||||
|
|
||||||
# # Shopping cart: needs price lists
|
|
||||||
{
|
{
|
||||||
"doctype": "Shopping Cart Settings",
|
"doctype": "Shopping Cart Settings",
|
||||||
"enabled": 1,
|
"enabled": 1,
|
||||||
@ -470,12 +453,8 @@ def install_defaults(args=None):
|
|||||||
'default_customer_group': _("Individual"),
|
'default_customer_group': _("Individual"),
|
||||||
'quotation_series': "QTN-",
|
'quotation_series': "QTN-",
|
||||||
},
|
},
|
||||||
|
|
||||||
# # TODO: Email digest, logo, website
|
|
||||||
# {}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# TODO:
|
|
||||||
make_records(records, True)
|
make_records(records, True)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user