2014-02-14 10:17:51 +00:00
|
|
|
from frappe import _
|
2014-03-03 09:35:28 +00:00
|
|
|
from frappe.widgets.moduleview import get_config
|
2014-02-07 13:34:19 +00:00
|
|
|
|
|
|
|
data = [
|
|
|
|
{
|
|
|
|
"label": _("Customize"),
|
|
|
|
"icon": "icon-glass",
|
|
|
|
"items": [
|
|
|
|
{
|
|
|
|
"type": "doctype",
|
|
|
|
"name": "Features Setup",
|
|
|
|
"description": _("Show / Hide features like Serial Nos, POS etc.")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "doctype",
|
|
|
|
"name": "Authorization Rule",
|
|
|
|
"description": _("Create rules to restrict transactions based on values.")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "doctype",
|
|
|
|
"name": "Notification Control",
|
|
|
|
"label": _("Email Notifications"),
|
|
|
|
"description": _("Automatically compose message on submission of transactions.")
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"label": _("Email"),
|
|
|
|
"icon": "icon-envelope",
|
|
|
|
"items": [
|
|
|
|
{
|
|
|
|
"type": "doctype",
|
|
|
|
"name": "Email Digest",
|
|
|
|
"description": _("Create and manage daily, weekly and monthly email digests.")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "doctype",
|
2014-03-03 10:35:00 +00:00
|
|
|
"name": "Email Settings",
|
|
|
|
"label": _("Support Email Settings"),
|
2014-02-07 13:34:19 +00:00
|
|
|
"description": _("Setup incoming server for support email id. (e.g. support@example.com)")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "doctype",
|
|
|
|
"name": "Sales Email Settings",
|
|
|
|
"description": _("Setup incoming server for sales email id. (e.g. sales@example.com)")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "doctype",
|
|
|
|
"name": "Jobs Email Settings",
|
|
|
|
"description": _("Setup incoming server for jobs email id. (e.g. jobs@example.com)")
|
|
|
|
},
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"label": _("Masters"),
|
|
|
|
"icon": "icon-star",
|
|
|
|
"items": [
|
|
|
|
{
|
|
|
|
"type": "doctype",
|
|
|
|
"name": "Company",
|
|
|
|
"description": _("Company (not Customer or Supplier) master.")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "doctype",
|
|
|
|
"name": "Item",
|
|
|
|
"description": _("Item master.")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "doctype",
|
|
|
|
"name": "Customer",
|
|
|
|
"description": _("Customer master.")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "doctype",
|
|
|
|
"name": "Supplier",
|
|
|
|
"description": _("Supplier master.")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "doctype",
|
|
|
|
"name": "Contact",
|
|
|
|
"description": _("Contact master.")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "doctype",
|
|
|
|
"name": "Address",
|
|
|
|
"description": _("Address master.")
|
|
|
|
},
|
|
|
|
]
|
|
|
|
},
|
|
|
|
]
|
2014-03-03 09:35:28 +00:00
|
|
|
|
|
|
|
def get_data():
|
|
|
|
out = list(data)
|
|
|
|
|
|
|
|
for module, label, icon in (
|
|
|
|
("accounts", _("Accounts"), "icon-money"),
|
|
|
|
("stock", _("Stock"), "icon-truck"),
|
|
|
|
("selling", _("Selling"), "icon-tag"),
|
|
|
|
("buying", _("Buying"), "icon-shopping-cart"),
|
|
|
|
("hr", _("Human Resources"), "icon-group"),
|
2014-03-03 10:35:00 +00:00
|
|
|
("support", _("Support"), "icon-phone"),
|
2014-03-03 09:35:28 +00:00
|
|
|
("website", _("Website"), "icon-globe")):
|
|
|
|
|
|
|
|
try:
|
|
|
|
config = get_config("erpnext", module)
|
|
|
|
except ImportError:
|
|
|
|
continue
|
|
|
|
|
|
|
|
for section in config:
|
|
|
|
if section.get("label")==_("Setup"):
|
|
|
|
out.append({
|
|
|
|
"label": label,
|
|
|
|
"icon": icon,
|
|
|
|
"items": section["items"]
|
|
|
|
})
|
|
|
|
break
|
|
|
|
|
|
|
|
return out
|