[minor] setting up website optional in setup wizard
This commit is contained in:
parent
722b22a834
commit
ec2d09c557
@ -47,7 +47,7 @@ cur_frm.cscript.account_type = function(doc, cdt, cdn) {
|
|||||||
|
|
||||||
cur_frm.cscript.add_toolbar_buttons = function(doc) {
|
cur_frm.cscript.add_toolbar_buttons = function(doc) {
|
||||||
cur_frm.add_custom_button(__('Chart of Accounts'),
|
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) {
|
if (doc.is_group == 1) {
|
||||||
cur_frm.add_custom_button(__('Group to Non-Group'),
|
cur_frm.add_custom_button(__('Group to Non-Group'),
|
||||||
@ -61,7 +61,7 @@ cur_frm.cscript.add_toolbar_buttons = function(doc) {
|
|||||||
"company": doc.company
|
"company": doc.company
|
||||||
};
|
};
|
||||||
frappe.set_route("query-report", "General Ledger");
|
frappe.set_route("query-report", "General Ledger");
|
||||||
}, __("View"));
|
});
|
||||||
|
|
||||||
cur_frm.add_custom_button(__('Non-Group to Group'),
|
cur_frm.add_custom_button(__('Non-Group to Group'),
|
||||||
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet', 'btn-default')
|
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet', 'btn-default')
|
||||||
|
@ -25,6 +25,9 @@ def execute(filters=None):
|
|||||||
return columns, res
|
return columns, res
|
||||||
|
|
||||||
def validate_filters(filters, account_details):
|
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):
|
if filters.get("account") and not account_details.get(filters.account):
|
||||||
frappe.throw(_("Account {0} does not exists").format(filters.account))
|
frappe.throw(_("Account {0} does not exists").format(filters.account))
|
||||||
|
|
||||||
@ -87,7 +90,7 @@ def get_columns(filters):
|
|||||||
columns += [
|
columns += [
|
||||||
_("Voucher Type") + "::120", _("Voucher No") + ":Dynamic Link/"+_("Voucher Type")+":160",
|
_("Voucher Type") + "::120", _("Voucher No") + ":Dynamic Link/"+_("Voucher Type")+":160",
|
||||||
_("Against Account") + "::120", _("Party Type") + "::80", _("Party") + "::150",
|
_("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"
|
_("Remarks") + "::400"
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -111,7 +114,7 @@ def get_gl_entries(filters):
|
|||||||
if filters.get("group_by_voucher") else "group by name"
|
if filters.get("group_by_voucher") else "group by name"
|
||||||
|
|
||||||
gl_entries = frappe.db.sql("""
|
gl_entries = frappe.db.sql("""
|
||||||
select
|
select
|
||||||
posting_date, account, party_type, party,
|
posting_date, account, party_type, party,
|
||||||
sum(debit) as debit, sum(credit) as credit,
|
sum(debit) as debit, sum(credit) as credit,
|
||||||
voucher_type, voucher_no, cost_center, project,
|
voucher_type, voucher_no, cost_center, project,
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Setup",
|
"document_type": "Setup",
|
||||||
|
"editable_grid": 0,
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
@ -36,6 +37,31 @@
|
|||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"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,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
@ -145,13 +171,14 @@
|
|||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"in_dialog": 0,
|
"in_dialog": 0,
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-05-12 14:19:41.689519",
|
"modified": "2016-08-09 05:01:30.287861",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Portal",
|
"module": "Portal",
|
||||||
"name": "Homepage",
|
"name": "Homepage",
|
||||||
|
@ -95,6 +95,31 @@
|
|||||||
"unique": 0,
|
"unique": 0,
|
||||||
"width": "150"
|
"width": "150"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"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,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
@ -260,7 +285,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-07-11 03:28:00.729983",
|
"modified": "2016-08-09 06:09:34.731971",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Portal",
|
"module": "Portal",
|
||||||
"name": "Homepage Featured Product",
|
"name": "Homepage Featured Product",
|
||||||
|
@ -311,6 +311,8 @@ function load_erpnext_slides() {
|
|||||||
slide.fields.push({fieldtype: "Section Break"});
|
slide.fields.push({fieldtype: "Section Break"});
|
||||||
slide.fields.push({fieldtype: "Check", fieldname: "add_sample_data",
|
slide.fields.push({fieldtype: "Check", fieldname: "add_sample_data",
|
||||||
label: __("Add a few sample records"), "default": 1});
|
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"
|
css_class: "two-column"
|
||||||
},
|
},
|
||||||
|
@ -41,7 +41,9 @@ def setup_complete(args=None):
|
|||||||
create_instructor(args)
|
create_instructor(args)
|
||||||
create_room(args)
|
create_room(args)
|
||||||
|
|
||||||
website_maker(args)
|
if args.get('setup_website'):
|
||||||
|
website_maker(args)
|
||||||
|
|
||||||
create_logo(args)
|
create_logo(args)
|
||||||
|
|
||||||
frappe.local.message_log = []
|
frappe.local.message_log = []
|
||||||
|
@ -15,6 +15,8 @@ def get_context(context):
|
|||||||
if route:
|
if route:
|
||||||
item.route = '/' + route
|
item.route = '/' + route
|
||||||
|
|
||||||
|
context.title = homepage.title or homepage.company
|
||||||
|
|
||||||
# show atleast 3 products
|
# show atleast 3 products
|
||||||
if len(homepage.products) < 3:
|
if len(homepage.products) < 3:
|
||||||
for i in xrange(3 - len(homepage.products)):
|
for i in xrange(3 - len(homepage.products)):
|
||||||
@ -24,6 +26,4 @@ def get_context(context):
|
|||||||
'route': '#'
|
'route': '#'
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
context.homepage = homepage
|
||||||
'homepage': homepage
|
|
||||||
}
|
|
||||||
|
@ -6,7 +6,7 @@ import unittest, frappe
|
|||||||
from frappe.utils import sel
|
from frappe.utils import sel
|
||||||
from frappe.utils import formatdate
|
from frappe.utils import formatdate
|
||||||
|
|
||||||
selenium_tests = True
|
#selenium_tests = True
|
||||||
|
|
||||||
# class TestLogin(unittest.TestCase):
|
# class TestLogin(unittest.TestCase):
|
||||||
# def setUp(self):
|
# def setUp(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user