[minor] setting up website optional in setup wizard
diff --git a/erpnext/accounts/doctype/account/account.js b/erpnext/accounts/doctype/account/account.js
index c3a01b9..2450a8a 100644
--- a/erpnext/accounts/doctype/account/account.js
+++ b/erpnext/accounts/doctype/account/account.js
@@ -47,7 +47,7 @@
cur_frm.cscript.add_toolbar_buttons = function(doc) {
cur_frm.add_custom_button(__('Chart of Accounts'),
- function() { frappe.set_route("Tree", "Account"); }, __("View"))
+ function() { frappe.set_route("Tree", "Account"); });
if (doc.is_group == 1) {
cur_frm.add_custom_button(__('Group to Non-Group'),
@@ -61,7 +61,7 @@
"company": doc.company
};
frappe.set_route("query-report", "General Ledger");
- }, __("View"));
+ });
cur_frm.add_custom_button(__('Non-Group to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet', 'btn-default')
diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py
index d10b3d9..15fd299 100644
--- a/erpnext/accounts/report/general_ledger/general_ledger.py
+++ b/erpnext/accounts/report/general_ledger/general_ledger.py
@@ -25,6 +25,9 @@
return columns, res
def validate_filters(filters, account_details):
+ if not filters.get('company'):
+ frappe.throw(_('{0} is mandatory').format(_('Company')))
+
if filters.get("account") and not account_details.get(filters.account):
frappe.throw(_("Account {0} does not exists").format(filters.account))
@@ -87,7 +90,7 @@
columns += [
_("Voucher Type") + "::120", _("Voucher No") + ":Dynamic Link/"+_("Voucher Type")+":160",
_("Against Account") + "::120", _("Party Type") + "::80", _("Party") + "::150",
- _("Project") + ":Link/Project:100", _("Cost Center") + ":Link/Cost Center:100",
+ _("Project") + ":Link/Project:100", _("Cost Center") + ":Link/Cost Center:100",
_("Remarks") + "::400"
]
@@ -111,7 +114,7 @@
if filters.get("group_by_voucher") else "group by name"
gl_entries = frappe.db.sql("""
- select
+ select
posting_date, account, party_type, party,
sum(debit) as debit, sum(credit) as credit,
voucher_type, voucher_no, cost_center, project,
diff --git a/erpnext/portal/doctype/homepage/homepage.json b/erpnext/portal/doctype/homepage/homepage.json
index cbe58c7..51d7955 100644
--- a/erpnext/portal/doctype/homepage/homepage.json
+++ b/erpnext/portal/doctype/homepage/homepage.json
@@ -9,6 +9,7 @@
"docstatus": 0,
"doctype": "DocType",
"document_type": "Setup",
+ "editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
@@ -40,6 +41,31 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "fieldname": "title",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "TItle",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
"description": "Company Tagline for website homepage",
"fieldname": "tag_line",
"fieldtype": "Data",
@@ -145,13 +171,14 @@
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
+ "image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 1,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-05-12 14:19:41.689519",
+ "modified": "2016-08-09 05:01:30.287861",
"modified_by": "Administrator",
"module": "Portal",
"name": "Homepage",
diff --git a/erpnext/portal/doctype/homepage_featured_product/homepage_featured_product.json b/erpnext/portal/doctype/homepage_featured_product/homepage_featured_product.json
index f3f9ce9..870c8b1 100644
--- a/erpnext/portal/doctype/homepage_featured_product/homepage_featured_product.json
+++ b/erpnext/portal/doctype/homepage_featured_product/homepage_featured_product.json
@@ -98,6 +98,31 @@
{
"allow_on_submit": 0,
"bold": 0,
+ "collapsible": 0,
+ "fieldname": "view",
+ "fieldtype": "Button",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "View",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
"collapsible": 1,
"fieldname": "section_break_5",
"fieldtype": "Section Break",
@@ -260,7 +285,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-07-11 03:28:00.729983",
+ "modified": "2016-08-09 06:09:34.731971",
"modified_by": "Administrator",
"module": "Portal",
"name": "Homepage Featured Product",
diff --git a/erpnext/public/js/setup_wizard.js b/erpnext/public/js/setup_wizard.js
index 55d3296..0013fdb 100644
--- a/erpnext/public/js/setup_wizard.js
+++ b/erpnext/public/js/setup_wizard.js
@@ -311,6 +311,8 @@
slide.fields.push({fieldtype: "Section Break"});
slide.fields.push({fieldtype: "Check", fieldname: "add_sample_data",
label: __("Add a few sample records"), "default": 1});
+ slide.fields.push({fieldtype: "Check", fieldname: "setup_website",
+ label: __("Setup a simple website for my organization"), "default": 1});
},
css_class: "two-column"
},
diff --git a/erpnext/setup/setup_wizard/setup_wizard.py b/erpnext/setup/setup_wizard/setup_wizard.py
index 97ca7a3..c9679bd 100644
--- a/erpnext/setup/setup_wizard/setup_wizard.py
+++ b/erpnext/setup/setup_wizard/setup_wizard.py
@@ -41,7 +41,9 @@
create_instructor(args)
create_room(args)
- website_maker(args)
+ if args.get('setup_website'):
+ website_maker(args)
+
create_logo(args)
frappe.local.message_log = []
diff --git a/erpnext/templates/pages/home.py b/erpnext/templates/pages/home.py
index 00cd3a9..9a4c89c 100644
--- a/erpnext/templates/pages/home.py
+++ b/erpnext/templates/pages/home.py
@@ -15,6 +15,8 @@
if route:
item.route = '/' + route
+ context.title = homepage.title or homepage.company
+
# show atleast 3 products
if len(homepage.products) < 3:
for i in xrange(3 - len(homepage.products)):
@@ -24,6 +26,4 @@
'route': '#'
})
- return {
- 'homepage': homepage
- }
+ context.homepage = homepage
diff --git a/erpnext/tests/test_client.py b/erpnext/tests/test_client.py
index 153ce75..bf88341 100644
--- a/erpnext/tests/test_client.py
+++ b/erpnext/tests/test_client.py
@@ -6,7 +6,7 @@
from frappe.utils import sel
from frappe.utils import formatdate
-selenium_tests = True
+#selenium_tests = True
# class TestLogin(unittest.TestCase):
# def setUp(self):