fix: Add demo setup check in setup wizard
diff --git a/erpnext/public/js/setup_wizard.js b/erpnext/public/js/setup_wizard.js
index a913844..a067ec0 100644
--- a/erpnext/public/js/setup_wizard.js
+++ b/erpnext/public/js/setup_wizard.js
@@ -38,6 +38,7 @@
{ fieldname: 'fy_start_date', label: __('Financial Year Begins On'), fieldtype: 'Date', reqd: 1 },
// end date should be hidden (auto calculated)
{ fieldname: 'fy_end_date', label: __('End Date'), fieldtype: 'Date', reqd: 1, hidden: 1 },
+ { fieldname: 'setup_demo', label: __('Generate dummy data for demo'), fieldtype: 'Check'},
],
onload: function (slide) {
diff --git a/erpnext/public/js/utils/demo.js b/erpnext/public/js/utils/demo.js
new file mode 100644
index 0000000..432bad6
--- /dev/null
+++ b/erpnext/public/js/utils/demo.js
@@ -0,0 +1,11 @@
+$(document).on("toolbar_setup", function() {
+ if (erpnext.is_demo_company_setup) {
+ console.log("setup");
+ }
+});
+
+erpnext.is_demo_company_setup = function() {
+ frappe.db.get_value("Global Default", "Global Default", "demo_company", function(r) {
+ console.log(r);
+ });
+};
\ No newline at end of file