From 9116a849696c1e1325ec3abad0436a91a357d8c4 Mon Sep 17 00:00:00 2001 From: Kanchan Chauhan Date: Thu, 30 Jun 2016 12:44:13 +0530 Subject: [PATCH] Enable shopping cart by default during company creation in setup --- erpnext/setup/setup_wizard/setup_wizard.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/erpnext/setup/setup_wizard/setup_wizard.py b/erpnext/setup/setup_wizard/setup_wizard.py index 1de376c0e52..ffcac985ce7 100644 --- a/erpnext/setup/setup_wizard/setup_wizard.py +++ b/erpnext/setup/setup_wizard/setup_wizard.py @@ -21,11 +21,11 @@ def setup_complete(args=None): install_fixtures.install(args.get("country")) update_setup_wizard_access() + create_price_lists(args) create_fiscal_year_and_company(args) create_users(args) set_defaults(args) create_territories() - create_price_lists(args) create_feed_and_todo() create_email_digest() create_letter_head(args) @@ -88,10 +88,23 @@ def create_fiscal_year_and_company(args): 'chart_of_accounts': args.get(('chart_of_accounts')), 'domain': args.get('domain') }).insert() - + + #Enable shopping cart + enable_shopping_cart(args) + # Bank Account create_bank_account(args) - + +def enable_shopping_cart(args): + frappe.get_doc({ + "doctype": "Shopping Cart Settings", + "enabled": 1, + 'company': args.get('company_name').strip(), + 'price_list': frappe.db.get_value("Price List", {"selling": 1}), + 'default_customer_group': _("Individual"), + 'quotation_series': "QTN-", + }).insert() + def create_bank_account(args): if args.get("bank_account"): company_name = args.get('company_name').strip()