From 2c14704398299525ffb7d277a2ceb0b94bfa9404 Mon Sep 17 00:00:00 2001 From: Prateeksha Singh Date: Tue, 29 Jan 2019 10:12:17 +0530 Subject: [PATCH] feat(modules): Add Retail module, update others --- erpnext/config/{accounts.py => accounting.py} | 46 ------ erpnext/config/desktop.py | 134 ++++++++++-------- erpnext/config/manufacturing.py | 2 +- erpnext/config/retail.py | 45 ++++++ erpnext/config/{setup.py => settings.py} | 0 5 files changed, 124 insertions(+), 103 deletions(-) rename erpnext/config/{accounts.py => accounting.py} (92%) create mode 100644 erpnext/config/retail.py rename erpnext/config/{setup.py => settings.py} (100%) diff --git a/erpnext/config/accounts.py b/erpnext/config/accounting.py similarity index 92% rename from erpnext/config/accounts.py rename to erpnext/config/accounting.py index 7461a63791..788d044a76 100644 --- a/erpnext/config/accounts.py +++ b/erpnext/config/accounting.py @@ -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 = { "label": _("Subscription Management"), "icon": "fa fa-microchip ", @@ -613,10 +571,6 @@ def get_data(): if "India" in countries: config.insert(7, gst) domains = frappe.get_active_domains() - if "Retail" in domains: - config.insert(2, retail) - else: - config.insert(7, retail) if "Services" in domains: config.insert(2, subscriptions) else: diff --git a/erpnext/config/desktop.py b/erpnext/config/desktop.py index 4e88d303b6..90d0ca0042 100644 --- a/erpnext/config/desktop.py +++ b/erpnext/config/desktop.py @@ -434,9 +434,12 @@ def get_data(): "hidden": 1 }, + # Modules { "module_name": "Accounting", + "category": "Modules", + "label": _("Accounting"), "color": "#3498db", "icon": "octicon octicon-repo", "type": "module", @@ -445,6 +448,8 @@ def get_data(): }, { "module_name": "Selling", + "category": "Modules", + "label": _("Selling"), "color": "#1abc9c", "icon": "octicon octicon-tag", "type": "module", @@ -453,16 +458,18 @@ def get_data(): }, { "module_name": "Buying", + "category": "Modules", + "label": _("Buying"), "color": "#c0392b", "icon": "octicon octicon-briefcase", "type": "module", "hidden": 1, - "description": "Purchasing, Suppliers and Products." + "description": "Purchasing, Suppliers and Products. Bluuuuu" }, - - { "module_name": "Stock", + "category": "Modules", + "label": _("Stock"), "color": "#f39c12", "icon": "octicon octicon-package", "type": "module", @@ -471,147 +478,162 @@ def get_data(): }, { "module_name": "Assets", + "category": "Modules", + "label": _("Assets"), "color": "#4286f4", "icon": "octicon octicon-database", "hidden": 1, - "label": _("Assets"), "type": "module", "description": "Asset Maintainance and Tools." }, { "module_name": "Projects", + "category": "Modules", + "label": _("Projects"), "color": "#8e44ad", "icon": "octicon octicon-rocket", "type": "module", "hidden": 1, "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" { "module_name": "Manufacturing", + "category": "Domains", + "label": _("Manufacturing"), "color": "#7f8c8d", "icon": "octicon octicon-tools", "type": "module", "hidden": 1, - "category": "Domains", "description": "Streamline your production with BOMS, Work Orders and Timesheets." }, { - "module_name": "CRM", - "color": "#EF4DB6", - "icon": "octicon octicon-broadcast", + "module_name": "Retail", + "category": "Domains", + "label": _("Retail"), + "color": "#7f8c8d", + "icon": "octicon octicon-credit-card", "type": "module", "hidden": 1, - "category": "Domains", - "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." + "description": "Streamline your production with BOMS, Work Orders and Timesheets." }, { "module_name": "Education", + "category": "Domains", + "label": _("Education"), "color": "#428B46", "icon": "octicon octicon-mortar-board", "type": "module", - "label": _("Education"), "hidden": 1, - "category": "Domains", "description": "Manage Student Admissions, Fees, Subjects and Score Reports." }, + { "module_name": "Healthcare", + "category": "Domains", + "label": _("Healthcare"), "color": "#FF888B", "icon": "fa fa-heartbeat", "type": "module", - "label": _("Healthcare"), "hidden": 1, - "category": "Domains", "description": "Patients appointments, procedures and tests, with diagnosis reports and drug prescriptions." }, { "module_name": "Agriculture", + "category": "Domains", + "label": _("Agriculture"), "color": "#8BC34A", "icon": "octicon octicon-globe", "type": "module", - "label": _("Agriculture"), "hidden": 1, - "category": "Domains", "description": "Crop Cycles, Land Areas and Soil and Plant Analysis." }, { "module_name": "Hotels", + "category": "Domains", + "label": _("Hotels"), "color": "#EA81E8", "icon": "fa fa-bed", "type": "module", - "label": _("Hotels"), "hidden": 1, - "category": "Domains", "description": "Manage Hotel Rooms, Pricing, Reservation and Amenities." }, - { "module_name": "Non Profit", + "category": "Domains", + "label": _("Non Profit"), "color": "#DE2B37", "icon": "octicon octicon-heart", "type": "module", - "label": _("Non Profit"), "hidden": 1, - "category": "Domains", - "description": "Volunteers, Memberships, Grants and Chapters." + "description": "Make benefiting others easier with Volunteers, Memberships, Grants and Chapters." }, { - "module_name": "Quality Management", - "color": "#1abc9c", - "icon": "fa fa-check-square-o", + "module_name": "Restaurant", + "category": "Domains", + "label": _("Restaurant"), + "color": "#EA81E8", + "icon": "fa fa-cutlery", + "_doctype": "Restaurant", "type": "module", - "label": _("Quality") + "link": "List/Restaurant", "hidden": 1, + "description": "Menu, Orders and Table Reservations." }, { "module_name": "Learn", + "category": "Administration", + "label": _("Learn"), "color": "#FF888B", "icon": "octicon octicon-device-camera-video", "type": "module", "is_help": True, - "label": _("Learn"), - "category": "Administration", "description": "Explore Help Articles and Videos." }, { "module_name": 'Marketplace', + "category": "Places", "label": _('Marketplace'), - "icon": "octicon octicon-heart", + "icon": "octicon octicon-star", "type": 'link', - "link": 'marketplace/home', + "link": '#marketplace/home', "color": '#FF4136', 'standard': 1, - "category": "Places", - "description": "Publish items to the other ERPNext users and start a conversation." + "description": "Publish items to 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." - } ] diff --git a/erpnext/config/manufacturing.py b/erpnext/config/manufacturing.py index 621c2dc4e2..b6fa1cf17f 100644 --- a/erpnext/config/manufacturing.py +++ b/erpnext/config/manufacturing.py @@ -40,7 +40,7 @@ def get_data(): }, { "type": "doctype", - "name": "BOM", + "name": "BOM Browser", "icon": "fa fa-sitemap", "label": _("BOM Browser"), "description": _("Tree of Bill of Materials"), diff --git a/erpnext/config/retail.py b/erpnext/config/retail.py new file mode 100644 index 0000000000..7852f3bf3f --- /dev/null +++ b/erpnext/config/retail.py @@ -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.") + } + ] + } + ] \ No newline at end of file diff --git a/erpnext/config/setup.py b/erpnext/config/settings.py similarity index 100% rename from erpnext/config/setup.py rename to erpnext/config/settings.py