[moduleview] added top bar

This commit is contained in:
Rushabh Mehta
2013-07-01 17:15:23 +05:30
parent 4cd0a07290
commit d420401ba3
12 changed files with 74 additions and 52 deletions

View File

@@ -91,6 +91,19 @@ items = [
},
{ "doctype": "Sales Taxes and Charges Master" },
{ "doctype": "Purchase Taxes and Charges Master" },
{
"type": "Section",
"title": "Opening Accounts and Stock",
"icon": "icon-eye-open"
},
{ "doctype": "Stock Reconciliation" },
{
"doctype": "Journal Voucher",
"title": "Opening Accounting Entries",
"filter": {
"is_opening": "Yes"
}
},
{
"type": "Section",
"title": "Human Resource",
@@ -148,19 +161,6 @@ items = [
{
"doctype": "Email Digest",
},
{
"type": "Section",
"title": "Opening Accounts and Stock",
"icon": "icon-eye-open"
},
{ "doctype": "Stock Reconciliation" },
{
"doctype": "Journal Voucher",
"title": "Opening Accounting Entries",
"filter": {
"is_opening": "Yes"
}
},
{
"type": "Section",
"title": "Customization",
@@ -244,8 +244,8 @@ def set_count(item):
elif "filter" in item:
key = item["filter"].keys()[0]
item["count"] = webnotes.conn.sql("""select count(*) from `tab%s` where
%s = %s""" % (item["doctype"], key, "%s"),
%s = %s and docstatus < 2""" % (item["doctype"], key, "%s"),
item["filter"][key])[0][0]
elif "doctype" in item:
item["count"] = webnotes.conn.sql("select count(*) from `tab%s`" \
item["count"] = webnotes.conn.sql("select count(*) from `tab%s` where docstatus<2" \
% item["doctype"])[0][0]