feat(modules): Add Retail module, update others

This commit is contained in:
Prateeksha Singh 2019-01-29 10:12:17 +05:30
parent 7cd6ebeb6d
commit 2c14704398
5 changed files with 124 additions and 103 deletions

View File

@ -542,48 +542,6 @@ def get_data():
] ]
} }
retail = {
"label": _("Retail Operations"),
"items": [
{
"type": "page",
"name": "pos",
"label": _("POS"),
"description": _("Point of Sale")
},
{
"type": "doctype",
"name": "Cashier Closing",
"description": _("Cashier Closing")
},
{
"type": "doctype",
"name": "POS Settings",
"description": _("Setup mode of POS (Online / Offline)")
},
{
"type": "doctype",
"name": "POS Profile",
"label": _("Point-of-Sale Profile"),
"description": _("Setup default values for POS Invoices")
},
{
"type": "doctype",
"name": "Loyalty Program",
"label": _("Loyalty Program"),
"description": _("To make Customer based incentive schemes.")
},
{
"type": "doctype",
"name": "Loyalty Point Entry",
"label": _("Loyalty Point Entry"),
"description": _("To view logs of Loyalty Points assigned to a Customer.")
}
]
}
subscriptions = { subscriptions = {
"label": _("Subscription Management"), "label": _("Subscription Management"),
"icon": "fa fa-microchip ", "icon": "fa fa-microchip ",
@ -613,10 +571,6 @@ def get_data():
if "India" in countries: if "India" in countries:
config.insert(7, gst) config.insert(7, gst)
domains = frappe.get_active_domains() domains = frappe.get_active_domains()
if "Retail" in domains:
config.insert(2, retail)
else:
config.insert(7, retail)
if "Services" in domains: if "Services" in domains:
config.insert(2, subscriptions) config.insert(2, subscriptions)
else: else:

View File

@ -434,9 +434,12 @@ def get_data():
"hidden": 1 "hidden": 1
}, },
# Modules # Modules
{ {
"module_name": "Accounting", "module_name": "Accounting",
"category": "Modules",
"label": _("Accounting"),
"color": "#3498db", "color": "#3498db",
"icon": "octicon octicon-repo", "icon": "octicon octicon-repo",
"type": "module", "type": "module",
@ -445,6 +448,8 @@ def get_data():
}, },
{ {
"module_name": "Selling", "module_name": "Selling",
"category": "Modules",
"label": _("Selling"),
"color": "#1abc9c", "color": "#1abc9c",
"icon": "octicon octicon-tag", "icon": "octicon octicon-tag",
"type": "module", "type": "module",
@ -453,16 +458,18 @@ def get_data():
}, },
{ {
"module_name": "Buying", "module_name": "Buying",
"category": "Modules",
"label": _("Buying"),
"color": "#c0392b", "color": "#c0392b",
"icon": "octicon octicon-briefcase", "icon": "octicon octicon-briefcase",
"type": "module", "type": "module",
"hidden": 1, "hidden": 1,
"description": "Purchasing, Suppliers and Products." "description": "Purchasing, Suppliers and Products. Bluuuuu"
}, },
{ {
"module_name": "Stock", "module_name": "Stock",
"category": "Modules",
"label": _("Stock"),
"color": "#f39c12", "color": "#f39c12",
"icon": "octicon octicon-package", "icon": "octicon octicon-package",
"type": "module", "type": "module",
@ -471,147 +478,162 @@ def get_data():
}, },
{ {
"module_name": "Assets", "module_name": "Assets",
"category": "Modules",
"label": _("Assets"),
"color": "#4286f4", "color": "#4286f4",
"icon": "octicon octicon-database", "icon": "octicon octicon-database",
"hidden": 1, "hidden": 1,
"label": _("Assets"),
"type": "module", "type": "module",
"description": "Asset Maintainance and Tools." "description": "Asset Maintainance and Tools."
}, },
{ {
"module_name": "Projects", "module_name": "Projects",
"category": "Modules",
"label": _("Projects"),
"color": "#8e44ad", "color": "#8e44ad",
"icon": "octicon octicon-rocket", "icon": "octicon octicon-rocket",
"type": "module", "type": "module",
"hidden": 1, "hidden": 1,
"description": "Updates, Timesheets and Activities." "description": "Updates, Timesheets and Activities."
}, },
{
"module_name": "CRM",
"category": "Modules",
"label": _("CRM"),
"color": "#EF4DB6",
"icon": "octicon octicon-broadcast",
"type": "module",
"hidden": 1,
"description": "Everything in your sales pipeline, from Leads to Customers, to Support."
},
{
"module_name": "HR",
"category": "Modules",
"label": _("Human Resources"),
"color": "#2ecc71",
"icon": "octicon octicon-organization",
"type": "module",
"hidden": 1,
"description": "Employee Lifecycle, Payroll, Shifts and Leaves."
},
{
"module_name": "Quality Management",
"category": "Modules",
"label": _("Quality"),
"color": "#1abc9c",
"icon": "fa fa-check-square-o",
"type": "module",
"hidden": 1,
"description": "Volunteers, Memberships, Grants and Chapters."
},
# Category: "Domains" # Category: "Domains"
{ {
"module_name": "Manufacturing", "module_name": "Manufacturing",
"category": "Domains",
"label": _("Manufacturing"),
"color": "#7f8c8d", "color": "#7f8c8d",
"icon": "octicon octicon-tools", "icon": "octicon octicon-tools",
"type": "module", "type": "module",
"hidden": 1, "hidden": 1,
"category": "Domains",
"description": "Streamline your production with BOMS, Work Orders and Timesheets." "description": "Streamline your production with BOMS, Work Orders and Timesheets."
}, },
{ {
"module_name": "CRM", "module_name": "Retail",
"color": "#EF4DB6", "category": "Domains",
"icon": "octicon octicon-broadcast", "label": _("Retail"),
"color": "#7f8c8d",
"icon": "octicon octicon-credit-card",
"type": "module", "type": "module",
"hidden": 1, "hidden": 1,
"category": "Domains", "description": "Streamline your production with BOMS, Work Orders and Timesheets."
"description": "Everything in your sales pipeline, from Leads to Customers, to Support."
},
{
"module_name": "HR",
"color": "#2ecc71",
"icon": "octicon octicon-organization",
"label": _("Human Resources"),
"type": "module",
"hidden": 1,
"category": "Domains",
"description": "Employee Lifecycle, Payroll, Shifts and Leaves."
}, },
{ {
"module_name": "Education", "module_name": "Education",
"category": "Domains",
"label": _("Education"),
"color": "#428B46", "color": "#428B46",
"icon": "octicon octicon-mortar-board", "icon": "octicon octicon-mortar-board",
"type": "module", "type": "module",
"label": _("Education"),
"hidden": 1, "hidden": 1,
"category": "Domains",
"description": "Manage Student Admissions, Fees, Subjects and Score Reports." "description": "Manage Student Admissions, Fees, Subjects and Score Reports."
}, },
{ {
"module_name": "Healthcare", "module_name": "Healthcare",
"category": "Domains",
"label": _("Healthcare"),
"color": "#FF888B", "color": "#FF888B",
"icon": "fa fa-heartbeat", "icon": "fa fa-heartbeat",
"type": "module", "type": "module",
"label": _("Healthcare"),
"hidden": 1, "hidden": 1,
"category": "Domains",
"description": "Patients appointments, procedures and tests, with diagnosis reports and drug prescriptions." "description": "Patients appointments, procedures and tests, with diagnosis reports and drug prescriptions."
}, },
{ {
"module_name": "Agriculture", "module_name": "Agriculture",
"category": "Domains",
"label": _("Agriculture"),
"color": "#8BC34A", "color": "#8BC34A",
"icon": "octicon octicon-globe", "icon": "octicon octicon-globe",
"type": "module", "type": "module",
"label": _("Agriculture"),
"hidden": 1, "hidden": 1,
"category": "Domains",
"description": "Crop Cycles, Land Areas and Soil and Plant Analysis." "description": "Crop Cycles, Land Areas and Soil and Plant Analysis."
}, },
{ {
"module_name": "Hotels", "module_name": "Hotels",
"category": "Domains",
"label": _("Hotels"),
"color": "#EA81E8", "color": "#EA81E8",
"icon": "fa fa-bed", "icon": "fa fa-bed",
"type": "module", "type": "module",
"label": _("Hotels"),
"hidden": 1, "hidden": 1,
"category": "Domains",
"description": "Manage Hotel Rooms, Pricing, Reservation and Amenities." "description": "Manage Hotel Rooms, Pricing, Reservation and Amenities."
}, },
{ {
"module_name": "Non Profit", "module_name": "Non Profit",
"category": "Domains",
"label": _("Non Profit"),
"color": "#DE2B37", "color": "#DE2B37",
"icon": "octicon octicon-heart", "icon": "octicon octicon-heart",
"type": "module", "type": "module",
"label": _("Non Profit"),
"hidden": 1, "hidden": 1,
"category": "Domains", "description": "Make benefiting others easier with Volunteers, Memberships, Grants and Chapters."
"description": "Volunteers, Memberships, Grants and Chapters."
}, },
{ {
"module_name": "Quality Management", "module_name": "Restaurant",
"color": "#1abc9c", "category": "Domains",
"icon": "fa fa-check-square-o", "label": _("Restaurant"),
"color": "#EA81E8",
"icon": "fa fa-cutlery",
"_doctype": "Restaurant",
"type": "module", "type": "module",
"label": _("Quality") "link": "List/Restaurant",
"hidden": 1, "hidden": 1,
"description": "Menu, Orders and Table Reservations."
}, },
{ {
"module_name": "Learn", "module_name": "Learn",
"category": "Administration",
"label": _("Learn"),
"color": "#FF888B", "color": "#FF888B",
"icon": "octicon octicon-device-camera-video", "icon": "octicon octicon-device-camera-video",
"type": "module", "type": "module",
"is_help": True, "is_help": True,
"label": _("Learn"),
"category": "Administration",
"description": "Explore Help Articles and Videos." "description": "Explore Help Articles and Videos."
}, },
{ {
"module_name": 'Marketplace', "module_name": 'Marketplace',
"category": "Places",
"label": _('Marketplace'), "label": _('Marketplace'),
"icon": "octicon octicon-heart", "icon": "octicon octicon-star",
"type": 'link', "type": 'link',
"link": 'marketplace/home', "link": '#marketplace/home',
"color": '#FF4136', "color": '#FF4136',
'standard': 1, 'standard': 1,
"category": "Places", "description": "Publish items to other ERPNext users and start a conversation."
"description": "Publish items to the other ERPNext users and start a conversation."
}, },
{
"module_name": "Restaurant",
"color": "#EA81E8",
"icon": "🍔",
"_doctype": "Restaurant",
"type": "module",
"link": "List/Restaurant",
"label": _("Restaurant"),
"category": "Domains",
"hidden": 1,
"description": "Menu, orders and table reservations."
}
] ]

View File

@ -40,7 +40,7 @@ def get_data():
}, },
{ {
"type": "doctype", "type": "doctype",
"name": "BOM", "name": "BOM Browser",
"icon": "fa fa-sitemap", "icon": "fa fa-sitemap",
"label": _("BOM Browser"), "label": _("BOM Browser"),
"description": _("Tree of Bill of Materials"), "description": _("Tree of Bill of Materials"),

45
erpnext/config/retail.py Normal file
View File

@ -0,0 +1,45 @@
from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Retail Operations"),
"items": [
{
"type": "page",
"name": "pos",
"label": _("POS"),
"description": _("Point of Sale")
},
{
"type": "doctype",
"name": "Cashier Closing",
"description": _("Cashier Closing")
},
{
"type": "doctype",
"name": "POS Settings",
"description": _("Setup mode of POS (Online / Offline)")
},
{
"type": "doctype",
"name": "POS Profile",
"label": _("Point-of-Sale Profile"),
"description": _("Setup default values for POS Invoices")
},
{
"type": "doctype",
"name": "Loyalty Program",
"label": _("Loyalty Program"),
"description": _("To make Customer based incentive schemes.")
},
{
"type": "doctype",
"name": "Loyalty Point Entry",
"label": _("Loyalty Point Entry"),
"description": _("To view logs of Loyalty Points assigned to a Customer.")
}
]
}
]