diff --git a/accounts/doctype/sales_taxes_and_charges_master/test_sales_taxes_and_charges_master.py b/accounts/doctype/sales_taxes_and_charges_master/test_sales_taxes_and_charges_master.py index 46ae8424d4..9bea271816 100644 --- a/accounts/doctype/sales_taxes_and_charges_master/test_sales_taxes_and_charges_master.py +++ b/accounts/doctype/sales_taxes_and_charges_master/test_sales_taxes_and_charges_master.py @@ -112,7 +112,7 @@ test_records = [ { "doctype": "For Territory", "parentfield": "valid_for_territories", - "territory": "India" + "territory": "_Test Territory India" } ], [ diff --git a/public/js/complete_setup.js b/public/js/complete_setup.js index 37c2fba52e..9d859797e2 100644 --- a/public/js/complete_setup.js +++ b/public/js/complete_setup.js @@ -84,6 +84,8 @@ $.extend(erpnext.complete_setup, { wn.container.wntoolbar.set_user_name(); setTimeout(function() { window.location.reload(); }, 3000); + } else { + $(this).done_working(); } }); diff --git a/setup/doctype/setup_control/setup_control.py b/setup/doctype/setup_control/setup_control.py index c481edfce6..87d4c374dd 100644 --- a/setup/doctype/setup_control/setup_control.py +++ b/setup/doctype/setup_control/setup_control.py @@ -87,18 +87,20 @@ class DocType: self.curr_fiscal_year = curr_fiscal_year def create_price_lists(self, args): - webnotes.bean({ - 'doctype': 'Price List', - 'price_list_name': 'Standard Selling', - "buying_or_selling": "Selling", - "currency": args["currency"] - }).insert(), - webnotes.bean({ - 'doctype': 'Price List', - 'price_list_name': 'Standard Buying', - "buying_or_selling": "Buying", - "currency": args["currency"] - }).insert(), + for pl_type in ["Selling", "Buying"]: + webnotes.bean([ + { + "doctype": "Price List", + "price_list_name": "Standard " + pl_type, + "buying_or_selling": pl_type, + "currency": args["currency"] + }, + { + "doctype": "For Territory", + "parentfield": "valid_for_territories", + "territory": "All Territories" + } + ]).insert() def set_defaults(self, args): # enable default currency @@ -207,15 +209,18 @@ class DocType: # ------------------------ def get_fy_details(self, fy_start, last_year=False): st = {'1st Jan':'01-01','1st Apr':'04-01','1st Jul':'07-01', '1st Oct': '10-01'} - curr_year = getdate(nowdate()).year - if last_year: - curr_year = curr_year - 1 if cint(getdate(nowdate()).month) < cint((st[fy_start].split('-'))[0]): curr_year = getdate(nowdate()).year - 1 + else: + curr_year = getdate(nowdate()).year + + if last_year: + curr_year = curr_year - 1 + stdt = cstr(curr_year)+'-'+cstr(st[fy_start]) if(fy_start == '1st Jan'): - fy = cstr(getdate(nowdate()).year) + fy = cstr(curr_year) abbr = cstr(fy)[-2:] else: fy = cstr(curr_year) + '-' + cstr(curr_year+1)