[minor] [setup-wizard] add check for sample data
This commit is contained in:
parent
8e8e9c61ca
commit
49a59c075f
@ -29,7 +29,7 @@ frappe.pages['setup-wizard'].on_page_load = function(wrapper) {
|
|||||||
erpnext.wiz.taxes.slide,
|
erpnext.wiz.taxes.slide,
|
||||||
erpnext.wiz.customers.slide,
|
erpnext.wiz.customers.slide,
|
||||||
erpnext.wiz.suppliers.slide,
|
erpnext.wiz.suppliers.slide,
|
||||||
erpnext.wiz.items.slide,
|
erpnext.wiz.items.slide
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -406,7 +406,6 @@ $.extend(erpnext.wiz, {
|
|||||||
description: __('Your financial year begins on'), reqd:1},
|
description: __('Your financial year begins on'), reqd:1},
|
||||||
{fieldname:'fy_end_date', label:__('Financial Year End Date'), fieldtype:'Date',
|
{fieldname:'fy_end_date', label:__('Financial Year End Date'), fieldtype:'Date',
|
||||||
description: __('Your financial year ends on'), reqd:1},
|
description: __('Your financial year ends on'), reqd:1},
|
||||||
|
|
||||||
],
|
],
|
||||||
help: __('The name of your company for which you are setting up this system.'),
|
help: __('The name of your company for which you are setting up this system.'),
|
||||||
|
|
||||||
@ -510,7 +509,7 @@ $.extend(erpnext.wiz, {
|
|||||||
slide: {
|
slide: {
|
||||||
icon: "icon-money",
|
icon: "icon-money",
|
||||||
"title": __("Add Users"),
|
"title": __("Add Users"),
|
||||||
"help": __("Add users to your organization"),
|
"help": __("Add users to your organization, other than yourself"),
|
||||||
"fields": [],
|
"fields": [],
|
||||||
before_load: function(slide) {
|
before_load: function(slide) {
|
||||||
slide.fields = [];
|
slide.fields = [];
|
||||||
@ -635,6 +634,11 @@ $.extend(erpnext.wiz, {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
slide.fields[1].reqd = 1;
|
slide.fields[1].reqd = 1;
|
||||||
|
|
||||||
|
// dummy data
|
||||||
|
slide.fields.push({fieldtype: "Section Break"});
|
||||||
|
slide.fields.push({fieldtype: "Check", fieldname: "add_sample_data",
|
||||||
|
label: __("Add a few sample records"), "default": 1});
|
||||||
},
|
},
|
||||||
css_class: "two-column"
|
css_class: "two-column"
|
||||||
},
|
},
|
||||||
|
@ -86,10 +86,11 @@ def setup_account(args=None):
|
|||||||
|
|
||||||
frappe.clear_cache()
|
frappe.clear_cache()
|
||||||
|
|
||||||
try:
|
if args.get("add_sample_data"):
|
||||||
make_sample_data()
|
try:
|
||||||
except FiscalYearError:
|
make_sample_data()
|
||||||
pass
|
except FiscalYearError:
|
||||||
|
pass
|
||||||
except:
|
except:
|
||||||
if args:
|
if args:
|
||||||
traceback = frappe.get_traceback()
|
traceback = frappe.get_traceback()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user