From 7cd6ebeb6dbd2ac2d707ecb59944dc7a1ef2ed29 Mon Sep 17 00:00:00 2001 From: Prateeksha Singh Date: Thu, 24 Jan 2019 07:15:53 +0530 Subject: [PATCH 1/7] feat(explore_page): rearrange links --- erpnext/config/accounts.py | 11 ++ erpnext/config/crm.py | 132 ++++++++++----- erpnext/config/desktop.py | 295 ++++++++++++++++++--------------- erpnext/config/hr.py | 296 +++++++++++++++------------------- erpnext/config/maintenance.py | 33 ---- erpnext/config/support.py | 60 ------- 6 files changed, 404 insertions(+), 423 deletions(-) delete mode 100644 erpnext/config/maintenance.py delete mode 100644 erpnext/config/support.py diff --git a/erpnext/config/accounts.py b/erpnext/config/accounts.py index 14b0646393..7461a63791 100644 --- a/erpnext/config/accounts.py +++ b/erpnext/config/accounts.py @@ -497,6 +497,7 @@ def get_data(): ] } ] + gst = { "label": _("Goods and Services Tax (GST India)"), "items": [ @@ -540,6 +541,8 @@ def get_data(): }, ] } + + retail = { "label": _("Retail Operations"), "items": [ @@ -579,10 +582,16 @@ def get_data(): } ] } + + subscriptions = { "label": _("Subscription Management"), "icon": "fa fa-microchip ", "items": [ + { + "type": "doctype", + "name": "Subscriber", + }, { "type": "doctype", "name": "Subscription Plan", @@ -597,6 +606,8 @@ def get_data(): } ] } + + countries = frappe.get_all("Company", fields="country") countries = [country["country"] for country in countries] if "India" in countries: diff --git a/erpnext/config/crm.py b/erpnext/config/crm.py index 5ac46bd7b8..1f0cdf64b6 100644 --- a/erpnext/config/crm.py +++ b/erpnext/config/crm.py @@ -27,6 +27,86 @@ def get_data(): "name": "Contact", "description": _("All Contacts."), }, + { + "type": "doctype", + "name": "Communication", + "description": _("Record of all communications of type email, phone, chat, visit, etc."), + }, + { + "type": "doctype", + "name": "Lead Source", + "description": _("Track Leads by Lead Source.") + }, + ] + }, + { + "label": _("Support"), + "items": [ + { + "type": "doctype", + "name": "Issue", + "description": _("Support queries from customers."), + }, + { + "type": "doctype", + "name": "Communication", + "description": _("Communication log."), + }, + { + "type": "doctype", + "name": "Warranty Claim", + "description": _("Warranty Claim against Serial No."), + }, + { + "type": "doctype", + "name": "Serial No", + "description": _("Single unit of an Item."), + }, + { + "type": "page", + "name": "support-analytics", + "label": _("Support Analytics"), + "icon": "fa fa-bar-chart" + }, + { + "type": "report", + "name": "Minutes to First Response for Issues", + "doctype": "Issue", + "is_query_report": True + }, + { + "type": "report", + "name": "Support Hours", + "doctype": "Issue", + "is_query_report": True + }, + ] + }, + { + "label": _("Maintenance"), + "icon": "fa fa-star", + "items": [ + { + "type": "doctype", + "name": "Maintenance Schedule", + "description": _("Plan for maintenance visits."), + }, + { + "type": "doctype", + "name": "Maintenance Visit", + "description": _("Visit report for maintenance call."), + }, + { + "type": "report", + "name": "Maintenance Schedules", + "is_query_report": True, + "doctype": "Maintenance Schedule" + }, + { + "type": "doctype", + "name": "Warranty Claim", + "description": _("Warranty Claim against Serial No."), + }, ] }, { @@ -83,17 +163,6 @@ def get_data(): } ] }, - { - "label": _("Communication"), - "icon": "fa fa-star", - "items": [ - { - "type": "doctype", - "name": "Communication", - "description": _("Record of all communications of type email, phone, chat, visit, etc."), - }, - ] - }, { "label": _("Setup"), "icon": "fa fa-cog", @@ -127,17 +196,6 @@ def get_data(): "link": "Tree/Sales Person", "description": _("Manage Sales Person Tree."), }, - { - "type": "doctype", - "name": "Lead Source", - "description": _("Track Leads by Lead Source.") - }, - ] - }, - { - "label": _("SMS"), - "icon": "fa fa-wrench", - "items": [ { "type": "doctype", "name": "SMS Center", @@ -155,19 +213,19 @@ def get_data(): } ] }, - { - "label": _("Help"), - "items": [ - { - "type": "help", - "label": _("Lead to Quotation"), - "youtube_id": "TxYX4r4JAKA" - }, - { - "type": "help", - "label": _("Newsletters"), - "youtube_id": "muLKsCrrDRo" - }, - ] - }, + # { + # "label": _("Help"), + # "items": [ + # { + # "type": "help", + # "label": _("Lead to Quotation"), + # "youtube_id": "TxYX4r4JAKA" + # }, + # { + # "type": "help", + # "label": _("Newsletters"), + # "youtube_id": "muLKsCrrDRo" + # }, + # ] + # }, ] diff --git a/erpnext/config/desktop.py b/erpnext/config/desktop.py index 762f48a52e..4e88d303b6 100644 --- a/erpnext/config/desktop.py +++ b/erpnext/config/desktop.py @@ -68,57 +68,6 @@ def get_data(): }, # old - { - "label": _("Accounting"), - "module_name": "Accounts", - "color": "#3498db", - "icon": "octicon octicon-repo", - "type": "module", - "hidden": 1 - }, - { - "module_name": "Stock", - "color": "#f39c12", - "icon": "octicon octicon-package", - "type": "module", - "hidden": 1 - }, - { - "module_name": "CRM", - "color": "#EF4DB6", - "icon": "octicon octicon-broadcast", - "type": "module", - "hidden": 1 - }, - { - "module_name": "Selling", - "color": "#1abc9c", - "icon": "octicon octicon-tag", - "type": "module", - "hidden": 1 - }, - { - "module_name": "Buying", - "color": "#c0392b", - "icon": "octicon octicon-briefcase", - "type": "module", - "hidden": 1 - }, - { - "module_name": "HR", - "color": "#2ecc71", - "icon": "octicon octicon-organization", - "label": _("Human Resources"), - "type": "module", - "hidden": 1 - }, - { - "module_name": "Manufacturing", - "color": "#7f8c8d", - "icon": "octicon octicon-tools", - "type": "module", - "hidden": 1 - }, { "module_name": "POS", "color": "#589494", @@ -135,30 +84,6 @@ def get_data(): "link": "leaderboard", "label": _("Leaderboard") }, - { - "module_name": "Support", - "color": "#2c3e50", - "icon": "octicon octicon-issue-opened", - "type": "module", - "hidden": 1 - }, - { - "module_name": "Help", - "color": "#FF888B", - "icon": "octicon octicon-device-camera-video", - "type": "module", - "is_help": True, - "label": _("Help"), - "hidden": 1 - }, - { - "module_name": "Maintenance", - "color": "#FF888B", - "icon": "octicon octicon-tools", - "type": "module", - "label": _("Maintenance"), - "hidden": 1 - }, { "module_name": "Student", "color": "#c0392b", @@ -259,22 +184,6 @@ def get_data(): "type": "list", "hidden": 1 }, - { - "module_name": "Education", - "color": "#428B46", - "icon": "octicon octicon-mortar-board", - "type": "module", - "label": _("Education"), - "hidden": 1 - }, - { - "module_name": "Healthcare", - "color": "#FF888B", - "icon": "fa fa-heartbeat", - "type": "module", - "label": _("Healthcare"), - "hidden": 1 - }, { "module_name": "Patient", "color": "#6BE273", @@ -373,32 +282,6 @@ def get_data(): "link": "List/Data Import", "type": "list" }, - { - "module_name": "Restaurant", - "color": "#EA81E8", - "icon": "🍔", - "_doctype": "Restaurant", - "type": "module", - "link": "List/Restaurant", - "label": _("Restaurant"), - "hidden": 1 - }, - { - "module_name": "Hotels", - "color": "#EA81E8", - "icon": "fa fa-bed", - "type": "module", - "label": _("Hotels"), - "hidden": 1 - }, - { - "module_name": "Agriculture", - "color": "#8BC34A", - "icon": "octicon octicon-globe", - "type": "module", - "label": _("Agriculture"), - "hidden": 1 - }, { "module_name": "Crop", "_doctype": "Crop", @@ -499,14 +382,6 @@ def get_data(): "link": "List/Weather", "hidden": 1 }, - { - "module_name": "Assets", - "color": "#4286f4", - "icon": "octicon octicon-database", - "hidden": 1, - "label": _("Assets"), - "type": "module" - }, { "module_name": "Grant Application", "color": "#E9AB17", @@ -558,13 +433,141 @@ def get_data(): "label": _("Chapter"), "hidden": 1 }, + + # Modules + { + "module_name": "Accounting", + "color": "#3498db", + "icon": "octicon octicon-repo", + "type": "module", + "hidden": 1, + "description": "Accounts, Banking, Ledgers and Statements, with Billings and Subscriptions." + }, + { + "module_name": "Selling", + "color": "#1abc9c", + "icon": "octicon octicon-tag", + "type": "module", + "hidden": 1, + "description": "All things Sales, Customer and Products." + }, + { + "module_name": "Buying", + "color": "#c0392b", + "icon": "octicon octicon-briefcase", + "type": "module", + "hidden": 1, + "description": "Purchasing, Suppliers and Products." + }, + + + { + "module_name": "Stock", + "color": "#f39c12", + "icon": "octicon octicon-package", + "type": "module", + "hidden": 1, + "description": "Track Stock Transactions, Reports, and Serialized Items and Batches." + }, + { + "module_name": "Assets", + "color": "#4286f4", + "icon": "octicon octicon-database", + "hidden": 1, + "label": _("Assets"), + "type": "module", + "description": "Asset Maintainance and Tools." + }, + { + "module_name": "Projects", + "color": "#8e44ad", + "icon": "octicon octicon-rocket", + "type": "module", + "hidden": 1, + "description": "Updates, Timesheets and Activities." + }, + + + # Category: "Domains" + { + "module_name": "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", + "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." + }, + { + "module_name": "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", + "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", + "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", + "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", "color": "#DE2B37", "icon": "octicon octicon-heart", "type": "module", "label": _("Non Profit"), - "hidden": 1 + "hidden": 1, + "category": "Domains", + "description": "Volunteers, Memberships, Grants and Chapters." }, { "module_name": "Quality Management", @@ -572,5 +575,43 @@ def get_data(): "icon": "fa fa-check-square-o", "type": "module", "label": _("Quality") + "hidden": 1, + }, + + + { + "module_name": "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', + "label": _('Marketplace'), + "icon": "octicon octicon-heart", + "type": 'link', + "link": 'marketplace/home', + "color": '#FF4136', + 'standard': 1, + "category": "Places", + "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." } - ] \ No newline at end of file + ] diff --git a/erpnext/config/hr.py b/erpnext/config/hr.py index dca30448ac..647d152e02 100644 --- a/erpnext/config/hr.py +++ b/erpnext/config/hr.py @@ -10,6 +10,36 @@ def get_data(): "type": "doctype", "name": "Employee", }, + { + "type": "doctype", + "name": "Employee Transfer", + }, + { + "type": "doctype", + "name": "Employee Promotion", + }, + { + "type": "doctype", + "name": "Employee Separation", + }, + { + "type": "doctype", + "name": "Employee Onboarding" + }, + { + "type": "doctype", + "name": "Employee Separation Template", + }, + { + "type": "doctype", + "name": "Employee Onboarding Template" + } + ] + }, + + { + "label": _("Attendance and Leaves"), + "items": [ { "type": "doctype", "name": "Employee Attendance Tool", @@ -27,12 +57,7 @@ def get_data(): "type": "doctype", "name": "Upload Attendance", "hide_count": True - } - ] - }, - { - "label": _("Leaves and Holiday"), - "items": [ + }, { "type": "doctype", "name": "Leave Application", @@ -114,11 +139,6 @@ def get_data(): "type": "doctype", "name": "Retention Bonus", }, - ] - }, - { - "label": _("Payroll Setup"), - "items": [ { "type": "doctype", "name": "Payroll Period", @@ -131,19 +151,32 @@ def get_data(): "type": "doctype", "name": "Salary Structure", }, - { - "type": "doctype", - "name": "Employee Tax Exemption Category", - }, - { - "type": "doctype", - "name": "Employee Tax Exemption Sub Category" - } + # { + # "type": "doctype", + # "name": "Employee Tax Exemption Category", + # }, + # { + # "type": "doctype", + # "name": "Employee Tax Exemption Sub Category" + # } ] }, { - "label": _("Travel and Expense Claim"), + "label": _("Appraisals, Expense Claims and Loans"), "items": [ + { + "type": "doctype", + "name": "Appraisal", + }, + { + "type": "doctype", + "name": "Appraisal Template", + }, + { + "type": "page", + "name": "team-updates", + "label": _("Team Updates") + }, { "type": "doctype", "name": "Employee Advance", @@ -160,30 +193,6 @@ def get_data(): "type": "doctype", "name": "Travel Request", }, - ] - }, - { - "label": _("Appraisals"), - "items": [ - { - "type": "doctype", - "name": "Appraisal", - }, - { - "type": "doctype", - "name": "Appraisal Template", - }, - { - "type": "page", - "name": "team-updates", - "label": _("Team Updates") - }, - ] - }, - { - "label": _("Loan Management"), - "icon": "icon-list", - "items": [ { "type": "doctype", "name": "Loan Type", @@ -199,36 +208,7 @@ def get_data(): ] }, { - "label": _("Employee Lifecycle"), - "items": [ - { - "type": "doctype", - "name": "Employee Transfer", - }, - { - "type": "doctype", - "name": "Employee Promotion", - }, - { - "type": "doctype", - "name": "Employee Separation", - }, - { - "type": "doctype", - "name": "Employee Onboarding" - }, - { - "type": "doctype", - "name": "Employee Separation Template", - }, - { - "type": "doctype", - "name": "Employee Onboarding Template" - } - ] - }, - { - "label": _("Recruitment"), + "label": _("Recruitment and Training"), "items": [ { "type": "doctype", @@ -242,11 +222,6 @@ def get_data(): "type": "doctype", "name": "Job Offer", }, - ] - }, - { - "label": _("Training"), - "items": [ { "type": "doctype", "name": "Training Program" @@ -266,7 +241,60 @@ def get_data(): ] }, { - "label": _("Shift Management"), + "label": _("Reports"), + "icon": "fa fa-list", + "items": [ + { + "type": "report", + "is_query_report": True, + "name": "Employee Leave Balance", + "doctype": "Leave Application" + }, + { + "type": "report", + "is_query_report": True, + "name": "Employee Birthday", + "doctype": "Employee" + }, + { + "type": "report", + "is_query_report": True, + "name": "Employees working on a holiday", + "doctype": "Employee" + }, + { + "type": "report", + "name": "Employee Information", + "doctype": "Employee" + }, + { + "type": "report", + "is_query_report": True, + "name": "Salary Register", + "doctype": "Salary Slip" + }, + { + "type": "report", + "is_query_report": True, + "name": "Monthly Attendance Sheet", + "doctype": "Attendance" + }, + { + "type": "report", + "is_query_report": True, + "name": "Vehicle Expenses", + "doctype": "Vehicle" + }, + { + "type": "report", + "is_query_report": True, + "name": "Department Analytics", + "doctype": "Employee" + }, + ] + }, + { + "label": _("Shifts and Fleet Management"), "items": [ { "type": "doctype", @@ -279,12 +307,7 @@ def get_data(): { "type": "doctype", "name": "Shift Assignment", - } - ] - }, - { - "label": _("Fleet Management"), - "items": [ + }, { "type": "doctype", "name": "Vehicle" @@ -337,84 +360,25 @@ def get_data(): } ] }, - { - "label": _("Reports"), - "icon": "fa fa-list", - "items": [ - { - "type": "report", - "is_query_report": True, - "name": "Employee Leave Balance", - "doctype": "Leave Application" - }, - { - "type": "report", - "is_query_report": True, - "name": "Employee Birthday", - "doctype": "Employee" - }, - { - "type": "report", - "is_query_report": True, - "name": "Employees working on a holiday", - "doctype": "Employee" - }, - { - "type": "report", - "name": "Employee Information", - "doctype": "Employee" - }, - { - "type": "report", - "is_query_report": True, - "name": "Salary Register", - "doctype": "Salary Slip" - }, - { - "type": "report", - "is_query_report": True, - "name": "Monthly Attendance Sheet", - "doctype": "Attendance" - }, - { - "type": "report", - "is_query_report": True, - "name": "Vehicle Expenses", - "doctype": "Vehicle" - }, - - ] - }, - { - "label": _("Help"), - "icon": "fa fa-facetime-video", - "items": [ - { - "type": "help", - "label": _("Setting up Employees"), - "youtube_id": "USfIUdZlUhw" - }, - { - "type": "help", - "label": _("Leave Management"), - "youtube_id": "fc0p_AXebc8" - }, - { - "type": "help", - "label": _("Expense Claims"), - "youtube_id": "5SZHJF--ZFY" - } - ] - }, - { - "label": _("Analytics"), - "items": [ - { - "type": "report", - "is_query_report": True, - "name": "Department Analytics", - "doctype": "Employee" - }, - ] - } + # { + # "label": _("Help"), + # "icon": "fa fa-facetime-video", + # "items": [ + # { + # "type": "help", + # "label": _("Setting up Employees"), + # "youtube_id": "USfIUdZlUhw" + # }, + # { + # "type": "help", + # "label": _("Leave Management"), + # "youtube_id": "fc0p_AXebc8" + # }, + # { + # "type": "help", + # "label": _("Expense Claims"), + # "youtube_id": "5SZHJF--ZFY" + # } + # ] + # }, ] diff --git a/erpnext/config/maintenance.py b/erpnext/config/maintenance.py deleted file mode 100644 index 97be47cdd1..0000000000 --- a/erpnext/config/maintenance.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import unicode_literals -from frappe import _ - -def get_data(): - return [ - { - "label": _("Maintenance"), - "icon": "fa fa-star", - "items": [ - { - "type": "doctype", - "name": "Maintenance Schedule", - "description": _("Plan for maintenance visits."), - }, - { - "type": "doctype", - "name": "Maintenance Visit", - "description": _("Visit report for maintenance call."), - }, - { - "type": "report", - "name": "Maintenance Schedules", - "is_query_report": True, - "doctype": "Maintenance Schedule" - }, - { - "type": "doctype", - "name": "Warranty Claim", - "description": _("Warranty Claim against Serial No."), - }, - ] - } - ] \ No newline at end of file diff --git a/erpnext/config/support.py b/erpnext/config/support.py deleted file mode 100644 index b85c430899..0000000000 --- a/erpnext/config/support.py +++ /dev/null @@ -1,60 +0,0 @@ -from __future__ import unicode_literals -from frappe import _ - -def get_data(): - return [ - { - "label": _("Issues"), - "items": [ - { - "type": "doctype", - "name": "Issue", - "description": _("Support queries from customers."), - }, - { - "type": "doctype", - "name": "Communication", - "description": _("Communication log."), - }, - ] - }, - { - "label": _("Warranty"), - "items": [ - { - "type": "doctype", - "name": "Warranty Claim", - "description": _("Warranty Claim against Serial No."), - }, - { - "type": "doctype", - "name": "Serial No", - "description": _("Single unit of an Item."), - }, - ] - }, - { - "label": _("Reports"), - "icon": "fa fa-list", - "items": [ - { - "type": "page", - "name": "support-analytics", - "label": _("Support Analytics"), - "icon": "fa fa-bar-chart" - }, - { - "type": "report", - "name": "Minutes to First Response for Issues", - "doctype": "Issue", - "is_query_report": True - }, - { - "type": "report", - "name": "Support Hours", - "doctype": "Issue", - "is_query_report": True - }, - ] - }, - ] From 2c14704398299525ffb7d277a2ceb0b94bfa9404 Mon Sep 17 00:00:00 2001 From: Prateeksha Singh Date: Tue, 29 Jan 2019 10:12:17 +0530 Subject: [PATCH 2/7] 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 From ce27cffaad85bfb792187f4f4ce2e9a1c73b0b89 Mon Sep 17 00:00:00 2001 From: Prateeksha Singh Date: Wed, 30 Jan 2019 11:00:36 +0530 Subject: [PATCH 3/7] refactor(desk_icon): Remove reference and patches to Desktop Icon --- .../doctype/pos_settings/pos_settings.py | 7 +- erpnext/patches.txt | 8 -- .../v11_0/change_healthcare_desktop_icons.py | 94 ------------------- .../v11_0/merge_land_unit_with_location.py | 5 +- .../patches/v11_0/refactor_erpnext_shopify.py | 1 - .../patches/v11_0/remove_land_unit_icon.py | 19 ---- .../rename_production_order_to_work_order.py | 7 -- erpnext/patches/v12_0/change_qms_icon.py | 10 -- ...ame_accounts_desktop_icon_to_accounting.py | 10 -- erpnext/patches/v12_0/rename_learn_to_help.py | 12 --- .../rename_quality_management_to_quality.py | 10 -- ..._icon_with_projects_module_desktop_icon.py | 23 ----- .../v7_0/migrate_schools_to_erpnext.py | 10 +- .../patches/v8_1/delete_deprecated_reports.py | 21 ----- 14 files changed, 6 insertions(+), 231 deletions(-) delete mode 100644 erpnext/patches/v11_0/change_healthcare_desktop_icons.py delete mode 100644 erpnext/patches/v11_0/remove_land_unit_icon.py delete mode 100644 erpnext/patches/v12_0/change_qms_icon.py delete mode 100644 erpnext/patches/v12_0/rename_accounts_desktop_icon_to_accounting.py delete mode 100644 erpnext/patches/v12_0/rename_learn_to_help.py delete mode 100644 erpnext/patches/v12_0/rename_quality_management_to_quality.py delete mode 100644 erpnext/patches/v12_0/replace_project_list_desktop_icon_with_projects_module_desktop_icon.py diff --git a/erpnext/accounts/doctype/pos_settings/pos_settings.py b/erpnext/accounts/doctype/pos_settings/pos_settings.py index bdfd969df7..913f49829c 100644 --- a/erpnext/accounts/doctype/pos_settings/pos_settings.py +++ b/erpnext/accounts/doctype/pos_settings/pos_settings.py @@ -8,9 +8,4 @@ from frappe.model.document import Document class POSSettings(Document): def validate(self): - self.set_link_for_pos() - - def set_link_for_pos(self): - link = 'pos' if self.use_pos_in_offline_mode else 'point-of-sale' - frappe.db.sql(""" update `tabDesktop Icon` set link = '{0}' - where module_name like '%pos%'""".format(link)) \ No newline at end of file + pass \ No newline at end of file diff --git a/erpnext/patches.txt b/erpnext/patches.txt index c04049e252..8ab6153cd9 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -362,7 +362,6 @@ erpnext.patches.v7_1.set_budget_against_as_cost_center erpnext.patches.v7_1.set_currency_exchange_date erpnext.patches.v7_1.set_sales_person_status erpnext.patches.v7_1.repost_stock_for_deleted_bins_for_merging_items -execute:frappe.delete_doc('Desktop Icon', {'module_name': 'Profit and Loss Statment'}) erpnext.patches.v7_2.update_website_for_variant erpnext.patches.v7_2.update_assessment_modules erpnext.patches.v7_2.update_doctype_status @@ -545,7 +544,6 @@ erpnext.patches.v11_0.set_update_field_and_value_in_workflow_state erpnext.patches.v11_0.update_total_qty_field erpnext.patches.v11_0.update_sales_partner_type erpnext.patches.v11_0.rename_asset_adjustment_doctype -execute:frappe.db.sql("update `tabDesktop Icon` set type = 'module' where module_name = 'Restaurant'") erpnext.patches.v11_0.set_salary_component_properties erpnext.patches.v11_0.set_user_permissions_for_department erpnext.patches.v11_0.hr_ux_cleanups @@ -564,7 +562,6 @@ erpnext.patches.v11_0.make_job_card erpnext.patches.v11_0.redesign_healthcare_billing_work_flow erpnext.patches.v10_0.delete_hub_documents # 12-08-2018 erpnext.patches.v11_0.rename_healthcare_fields -erpnext.patches.v11_0.remove_land_unit_icon erpnext.patches.v11_0.add_default_dispatch_notification_template erpnext.patches.v11_0.add_market_segments erpnext.patches.v11_0.add_sales_stages @@ -574,7 +571,6 @@ execute:frappe.delete_doc_if_exists("Page", "stock-analytics") execute:frappe.delete_doc_if_exists("Page", "production-analytics") erpnext.patches.v11_0.ewaybill_fields_gst_india #2018-11-13 #2019-01-09 erpnext.patches.v11_0.drop_column_max_days_allowed -erpnext.patches.v11_0.change_healthcare_desktop_icons erpnext.patches.v10_0.update_user_image_in_employee erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items erpnext.patches.v10_0.allow_operators_in_supplier_scorecard @@ -585,8 +581,4 @@ erpnext.patches.v11_0.rename_additional_salary_component_additional_salary erpnext.patches.v11_0.renamed_from_to_fields_in_project erpnext.patches.v11_0.add_permissions_in_gst_settings erpnext.patches.v11_1.setup_guardian_role -erpnext.patches.v12_0.change_qms_icon -erpnext.patches.v12_0.rename_learn_to_help -erpnext.patches.v12_0.rename_accounts_desktop_icon_to_accounting -erpnext.patches.v12_0.replace_project_list_desktop_icon_with_projects_module_desktop_icon # 09-01-2019 erpnext.patches.v12_0.move_item_tax_to_item_tax_template diff --git a/erpnext/patches/v11_0/change_healthcare_desktop_icons.py b/erpnext/patches/v11_0/change_healthcare_desktop_icons.py deleted file mode 100644 index 0b77395865..0000000000 --- a/erpnext/patches/v11_0/change_healthcare_desktop_icons.py +++ /dev/null @@ -1,94 +0,0 @@ -from __future__ import unicode_literals -import frappe -from frappe import _ - -change_icons_map = [ - { - "module_name": "Patient", - "color": "#6BE273", - "icon": "fa fa-user", - "doctype": "Patient", - "type": "link", - "link": "List/Patient", - "label": _("Patient") - }, - { - "module_name": "Patient Encounter", - "color": "#2ecc71", - "icon": "fa fa-stethoscope", - "doctype": "Patient Encounter", - "type": "link", - "link": "List/Patient Encounter", - "label": _("Patient Encounter"), - }, - { - "module_name": "Healthcare Practitioner", - "color": "#2ecc71", - "icon": "fa fa-user-md", - "doctype": "Healthcare Practitioner", - "type": "link", - "link": "List/Healthcare Practitioner", - "label": _("Healthcare Practitioner") - }, - { - "module_name": "Patient Appointment", - "color": "#934F92", - "icon": "fa fa-calendar-plus-o", - "doctype": "Patient Appointment", - "type": "link", - "link": "List/Patient Appointment", - "label": _("Patient Appointment") - }, - { - "module_name": "Lab Test", - "color": "#7578f6", - "icon": "octicon octicon-beaker", - "doctype": "Lab Test", - "type": "link", - "link": "List/Lab Test", - "label": _("Lab Test") - } -] - -def execute(): - change_healthcare_desktop_icons() - -def change_healthcare_desktop_icons(): - doctypes = ["patient", "patient_encounter", "healthcare_practitioner", - "patient_appointment", "lab_test"] - for doctype in doctypes: - frappe.reload_doc("healthcare", "doctype", doctype) - for spec in change_icons_map: - frappe.db.sql(""" - delete from `tabDesktop Icon` - where _doctype = '{0}' - """.format(spec['doctype'])) - - desktop_icon = frappe.new_doc("Desktop Icon") - desktop_icon.hidden = 1 - desktop_icon.standard = 1 - desktop_icon.icon = spec['icon'] - desktop_icon.color = spec['color'] - desktop_icon.module_name = spec['module_name'] - desktop_icon.label = spec['label'] - desktop_icon.app = "erpnext" - desktop_icon.type = spec['type'] - desktop_icon._doctype = spec['doctype'] - desktop_icon.link = spec['link'] - desktop_icon.save(ignore_permissions=True) - - frappe.db.sql(""" - delete from `tabDesktop Icon` - where module_name = 'Healthcare' and type = 'module' - """) - - desktop_icon = frappe.new_doc("Desktop Icon") - desktop_icon.hidden = 1 - desktop_icon.standard = 1 - desktop_icon.icon = "fa fa-heartbeat" - desktop_icon.color = "#FF888B" - desktop_icon.module_name = "Healthcare" - desktop_icon.label = _("Healthcare") - desktop_icon.app = "erpnext" - desktop_icon.type = 'module' - desktop_icon.save(ignore_permissions=True) diff --git a/erpnext/patches/v11_0/merge_land_unit_with_location.py b/erpnext/patches/v11_0/merge_land_unit_with_location.py index 4ded98b5ca..1ea486dfd5 100644 --- a/erpnext/patches/v11_0/merge_land_unit_with_location.py +++ b/erpnext/patches/v11_0/merge_land_unit_with_location.py @@ -29,7 +29,7 @@ def execute(): if 'land_unit' in frappe.db.get_table_columns('Linked Location'): rename_field('Linked Location', 'land_unit', 'location') - + if not frappe.db.exists("Location", "All Land Units"): frappe.get_doc({"doctype": "Location", "is_group": True, "location_name": "All Land Units"}).insert(ignore_permissions=True) @@ -52,9 +52,6 @@ def execute(): 'rgt': land_unit.get('rgt') }).insert(ignore_permissions=True) - # frappe.db.sql("""update `tabDesktop Icon` set label='Location', module_name='Location' where label='Land Unit'""") - frappe.db.sql("""update `tabDesktop Icon` set link='List/Location' where link='List/Land Unit'""") - # Delete the Land Unit and Linked Land Unit doctypes if frappe.db.table_exists('Land Unit'): frappe.delete_doc('DocType', 'Land Unit', force=1) diff --git a/erpnext/patches/v11_0/refactor_erpnext_shopify.py b/erpnext/patches/v11_0/refactor_erpnext_shopify.py index a91fda72fb..340e9fc8bf 100644 --- a/erpnext/patches/v11_0/refactor_erpnext_shopify.py +++ b/erpnext/patches/v11_0/refactor_erpnext_shopify.py @@ -11,7 +11,6 @@ def execute(): if 'erpnext_shopify' in frappe.get_installed_apps(): remove_from_installed_apps('erpnext_shopify') - frappe.db.sql('delete from `tabDesktop Icon` where app="erpnext_shopify" ') frappe.delete_doc("Module Def", 'erpnext_shopify') frappe.db.commit() diff --git a/erpnext/patches/v11_0/remove_land_unit_icon.py b/erpnext/patches/v11_0/remove_land_unit_icon.py deleted file mode 100644 index f28c16f0c7..0000000000 --- a/erpnext/patches/v11_0/remove_land_unit_icon.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2018, Frappe and Contributors -# License: GNU General Public License v3. See license.txt - -from __future__ import unicode_literals - -# imports - module imports -import frappe - - -def execute(): - """ - Delete the "Land Unit" doc if exists from "Desktop Icon" doctype - """ - try: - doc = frappe.get_doc('Desktop Icon', {'standard': 1, 'module_name': 'Land Unit'}) - frappe.delete_doc('Desktop Icon', doc.name) - except frappe.ValidationError: - # The 'Land Unit' doc doesn't exist, nothing to do - pass diff --git a/erpnext/patches/v11_0/rename_production_order_to_work_order.py b/erpnext/patches/v11_0/rename_production_order_to_work_order.py index 72bdb68daf..2c27fbbc9d 100644 --- a/erpnext/patches/v11_0/rename_production_order_to_work_order.py +++ b/erpnext/patches/v11_0/rename_production_order_to_work_order.py @@ -26,10 +26,3 @@ def execute(): frappe.rename_doc("Report", "Open Production Orders", "Open Work Orders", force=True) frappe.rename_doc("Report", "Issued Items Against Production Order", "Issued Items Against Work Order", force=True) frappe.rename_doc("Report", "Production Order Stock Report", "Work Order Stock Report", force=True) - - frappe.db.sql("""update `tabDesktop Icon` \ - set label='Work Order', module_name='Work Order' \ - where label='Production Order'""") - frappe.db.sql("""update `tabDesktop Icon` \ - set link='List/Work Order' \ - where link='List/Production Order'""") diff --git a/erpnext/patches/v12_0/change_qms_icon.py b/erpnext/patches/v12_0/change_qms_icon.py deleted file mode 100644 index 2b6c09a0d0..0000000000 --- a/erpnext/patches/v12_0/change_qms_icon.py +++ /dev/null @@ -1,10 +0,0 @@ -import frappe - -def execute(): - qms_icons = frappe.get_all("Desktop Icon", filters={ - "module_name": "Quality Management" - }) - - for icon in qms_icons: - frappe.db.set_value('Desktop Icon', icon.name, 'color', '#1abc9c') - frappe.db.set_value('Desktop Icon', icon.name, 'icon', 'fa fa-check-square-o') diff --git a/erpnext/patches/v12_0/rename_accounts_desktop_icon_to_accounting.py b/erpnext/patches/v12_0/rename_accounts_desktop_icon_to_accounting.py deleted file mode 100644 index e24ed1ce83..0000000000 --- a/erpnext/patches/v12_0/rename_accounts_desktop_icon_to_accounting.py +++ /dev/null @@ -1,10 +0,0 @@ -import frappe -from frappe import _ - -def execute(): - accounts_module_icons = frappe.get_all('Desktop Icon', filters={ - 'module_name': 'Accounts' - }, fields=['name']) - - for icon in accounts_module_icons: - frappe.db.set_value('Desktop Icon', icon.name, 'label', _('Accounting')) \ No newline at end of file diff --git a/erpnext/patches/v12_0/rename_learn_to_help.py b/erpnext/patches/v12_0/rename_learn_to_help.py deleted file mode 100644 index 72f75f8b25..0000000000 --- a/erpnext/patches/v12_0/rename_learn_to_help.py +++ /dev/null @@ -1,12 +0,0 @@ -import frappe -from frappe import _ - -def execute(): - frappe.db.sql(""" - UPDATE `tabDesktop Icon` - SET - `module_name`='Help', `label`=%s - WHERE - `module_name`='Learn' AND - `standard`=1 - """, _('Help')) \ No newline at end of file diff --git a/erpnext/patches/v12_0/rename_quality_management_to_quality.py b/erpnext/patches/v12_0/rename_quality_management_to_quality.py deleted file mode 100644 index cdcf191b96..0000000000 --- a/erpnext/patches/v12_0/rename_quality_management_to_quality.py +++ /dev/null @@ -1,10 +0,0 @@ -import frappe -from frappe import _ - -def execute(): - quality_management_module_icons = frappe.get_all('Desktop Icon', filters={ - 'module_name': 'Quality Management' - }, fields=['name']) - - for icon in quality_management_module_icons: - frappe.db.set_value('Desktop Icon', icon.name, 'label', _('Quality')) \ No newline at end of file diff --git a/erpnext/patches/v12_0/replace_project_list_desktop_icon_with_projects_module_desktop_icon.py b/erpnext/patches/v12_0/replace_project_list_desktop_icon_with_projects_module_desktop_icon.py deleted file mode 100644 index dc848f4788..0000000000 --- a/erpnext/patches/v12_0/replace_project_list_desktop_icon_with_projects_module_desktop_icon.py +++ /dev/null @@ -1,23 +0,0 @@ -import frappe - -def execute(): - projects_icons = frappe.get_all('Desktop Icon', filters={ - 'module_name': ['in', ('Project', 'Projects')], - }) - - fields_to_update = { - 'module_name': 'Projects', - 'color': '#8e44ad', - 'icon': 'octicon octicon-rocket', - 'type': 'module', - 'link': '' - } - - for icon in projects_icons: - icon_doc = frappe.get_doc('Desktop Icon', icon.name) - icon_doc.update(fields_to_update) - try: - icon_doc.save() - except frappe.exceptions.UniqueValidationError: - # delete duplicate icon - icon_doc.delete() diff --git a/erpnext/patches/v7_0/migrate_schools_to_erpnext.py b/erpnext/patches/v7_0/migrate_schools_to_erpnext.py index 9137b5aa92..b72bc137b6 100644 --- a/erpnext/patches/v7_0/migrate_schools_to_erpnext.py +++ b/erpnext/patches/v7_0/migrate_schools_to_erpnext.py @@ -10,21 +10,19 @@ def execute(): frappe.reload_doc('buying', 'doctype', 'request_for_quotation') if 'schools' in frappe.get_installed_apps(): - frappe.db.sql("""delete from `tabDesktop Icon`""") - if not frappe.db.exists('Module Def', 'Schools') and frappe.db.exists('Module Def', 'Academics'): - + # 'Schools' module changed to the 'Education' # frappe.rename_doc("Module Def", "Academics", "Schools") - + frappe.rename_doc("Module Def", "Academics", "Education") - + remove_from_installed_apps("schools") def reload_doctypes_for_schools_icons(): # 'Schools' module changed to the 'Education' # base_path = frappe.get_app_path('erpnext', 'schools', 'doctype') - + base_path = frappe.get_app_path('erpnext', 'education', 'doctype') for doctype in os.listdir(base_path): if os.path.exists(os.path.join(base_path, doctype, doctype + '.json')) \ diff --git a/erpnext/patches/v8_1/delete_deprecated_reports.py b/erpnext/patches/v8_1/delete_deprecated_reports.py index 99d77c103c..3e0fdee719 100644 --- a/erpnext/patches/v8_1/delete_deprecated_reports.py +++ b/erpnext/patches/v8_1/delete_deprecated_reports.py @@ -14,32 +14,11 @@ def execute(): for report in reports: if frappe.db.exists("Report", report): - check_and_update_desktop_icon_for_report(report) check_and_update_auto_email_report(report) frappe.db.commit() frappe.delete_doc("Report", report, ignore_permissions=True) -def check_and_update_desktop_icon_for_report(report): - """ delete or update desktop icon""" - desktop_icons = frappe.db.sql_list("""select name from `tabDesktop Icon` - where _report='{0}'""".format(report)) - - if not desktop_icons: - return - - if report == "Monthly Salary Register": - for icon in desktop_icons: - frappe.delete_doc("Desktop Icon", icon) - - elif report in ["Customer Addresses And Contacts", "Supplier Addresses And Contacts"]: - frappe.db.sql("""update `tabDesktop Icon` set _report='{value}' - where name in ({docnames})""".format( - value="Addresses And Contacts", - docnames=",".join(["'%s'"%icon for icon in desktop_icons]) - ) - ) - def check_and_update_auto_email_report(report): """ delete or update auto email report for deprecated report """ From b5eb16faeb640db11871331d2dc3a532da2aee21 Mon Sep 17 00:00:00 2001 From: Prateeksha Singh Date: Thu, 31 Jan 2019 14:50:22 +0530 Subject: [PATCH 4/7] feat(config): add some onboarding cues --- erpnext/config/buying.py | 88 +++++++++++++++++++++------------------ erpnext/config/desktop.py | 2 +- 2 files changed, 49 insertions(+), 41 deletions(-) diff --git a/erpnext/config/buying.py b/erpnext/config/buying.py index e99b1d88aa..13a1c97b20 100644 --- a/erpnext/config/buying.py +++ b/erpnext/config/buying.py @@ -3,6 +3,49 @@ from frappe import _ def get_data(): return [ + { + "label": _("Items and Pricing"), + "items": [ + { + "type": "doctype", + "name": "Item", + "onboard": 1, + "description": _("All Products or Services."), + }, + { + "type": "doctype", + "name": "Price List", + "onboard": 1, + "description": _("Price List master.") + }, + { + "type": "doctype", + "name": "Item Price", + "description": _("Multiple Item prices."), + "onboard": 1, + "route": "Report/Item Price" + }, + { + "type": "doctype", + "name": "Product Bundle", + "description": _("Bundle items at time of sale."), + }, + { + "type": "doctype", + "name": "Item Group", + "icon": "fa fa-sitemap", + "label": _("Item Group"), + "link": "Tree/Item Group", + "description": _("Tree of Item Groups."), + }, + { + "type": "doctype", + "name": "Pricing Rule", + "description": _("Rules for applying pricing and discount.") + }, + + ] + }, { "label": _("Purchasing"), "icon": "fa fa-star", @@ -10,21 +53,25 @@ def get_data(): { "type": "doctype", "name": "Material Request", + "dependencies": ["Item"], "description": _("Request for purchase."), }, { "type": "doctype", "name": "Request for Quotation", + "dependencies": ["Item", "Supplier"], "description": _("Request for quotation."), }, { "type": "doctype", "name": "Supplier Quotation", + "dependencies": ["Item", "Supplier"], "description": _("Quotations received from Suppliers."), }, { "type": "doctype", "name": "Purchase Order", + "dependencies": ["Item", "Supplier"], "description": _("Purchase Orders given to Suppliers."), }, ] @@ -35,6 +82,7 @@ def get_data(): { "type": "doctype", "name": "Supplier", + "onboard": 1, "description": _("Supplier database."), }, { @@ -77,46 +125,6 @@ def get_data(): }, ] }, - { - "label": _("Items and Pricing"), - "items": [ - { - "type": "doctype", - "name": "Item", - "description": _("All Products or Services."), - }, - { - "type": "doctype", - "name": "Product Bundle", - "description": _("Bundle items at time of sale."), - }, - { - "type": "doctype", - "name": "Price List", - "description": _("Price List master.") - }, - { - "type": "doctype", - "name": "Item Group", - "icon": "fa fa-sitemap", - "label": _("Item Group"), - "link": "Tree/Item Group", - "description": _("Tree of Item Groups."), - }, - { - "type": "doctype", - "name": "Item Price", - "description": _("Multiple Item prices."), - "route": "Report/Item Price" - }, - { - "type": "doctype", - "name": "Pricing Rule", - "description": _("Rules for applying pricing and discount.") - }, - - ] - }, { "label": _("Analytics"), "icon": "fa fa-table", diff --git a/erpnext/config/desktop.py b/erpnext/config/desktop.py index 90d0ca0042..18132c63ba 100644 --- a/erpnext/config/desktop.py +++ b/erpnext/config/desktop.py @@ -547,7 +547,7 @@ def get_data(): "icon": "octicon octicon-credit-card", "type": "module", "hidden": 1, - "description": "Streamline your production with BOMS, Work Orders and Timesheets." + "description": "Point of Sale, Cashier Closing and Loyalty Programs." }, { "module_name": "Education", From 063af4ed08c904ffd1c18c77cf54e898fe1556ac Mon Sep 17 00:00:00 2001 From: Prateeksha Singh Date: Wed, 6 Feb 2019 17:02:41 +0530 Subject: [PATCH 5/7] config(modules): Rearrange links --- erpnext/config/accounting.py | 314 +++++++++++++++++------------------ erpnext/config/assets.py | 33 ++-- erpnext/config/buying.py | 60 ++++--- erpnext/config/crm.py | 47 ++++-- erpnext/config/desktop.py | 2 +- erpnext/config/hr.py | 4 - erpnext/config/projects.py | 36 ++-- erpnext/config/selling.py | 287 +++++++++++++++----------------- erpnext/config/stock.py | 75 +++++++-- 9 files changed, 463 insertions(+), 395 deletions(-) diff --git a/erpnext/config/accounting.py b/erpnext/config/accounting.py index 788d044a76..0db5ff053b 100644 --- a/erpnext/config/accounting.py +++ b/erpnext/config/accounting.py @@ -6,43 +6,30 @@ import frappe def get_data(): config = [ { - "label": _("Billing"), + "label": _("Masters and Accounts"), "items": [ { "type": "doctype", - "name": "Sales Invoice", - "description": _("Bills raised to Customers.") + "name": "Item", + "onboard": 1, }, { "type": "doctype", - "name": "Purchase Invoice", - "description": _("Bills raised by Suppliers.") + "name": "Customer", + "description": _("Customer database."), + "onboard": 1, }, { "type": "doctype", - "name": "Payment Request", - "description": _("Payment Request") + "name": "Supplier", + "description": _("Supplier database."), + "onboard": 1, }, - { - "type": "doctype", - "name": "Payment Entry", - "description": _("Bank/Cash transactions against party or for internal transfer") - } - ] - - }, - { - "label": _("Company and Accounts"), - "items": [ { "type": "doctype", "name": "Company", - "description": _("Company (not Customer or Supplier) master.") - }, - { - "type": "doctype", - "name": "Journal Entry", - "description": _("Accounting journal entries.") + "description": _("Company (not Customer or Supplier) master."), + "onboard": 1, }, { "type": "doctype", @@ -51,37 +38,144 @@ def get_data(): "label": _("Chart of Accounts"), "route": "Tree/Account", "description": _("Tree of financial accounts."), + "onboard": 1, }, + { + "type": "doctype", + "name": "Journal Entry", + "description": _("Accounting journal entries."), + "onboard": 1, + }, + { + "type": "doctype", + "name": "Opening Invoice Creation Tool", + "description": _("Create Opening Sales and Purchase Invoices") + }, + ] + }, + { + "label": _("Billing"), + "items": [ + { + "type": "doctype", + "name": "Sales Invoice", + "description": _("Bills raised to Customers."), + "onboard": 1, + }, + { + "type": "doctype", + "name": "Purchase Invoice", + "description": _("Bills raised by Suppliers."), + "onboard": 1 + }, + { + "type": "doctype", + "name": "Payment Request", + "description": _("Payment Request"), + }, + { + "type": "doctype", + "name": "Payment Entry", + "description": _("Bank/Cash transactions against party or for internal transfer") + }, + + # Reports + { + "type": "report", + "name": "Ordered Items To Be Billed", + "is_query_report": True, + "reference_doctype": "Sales Invoice" + }, + { + "type": "report", + "name": "Delivered Items To Be Billed", + "is_query_report": True, + "reference_doctype": "Sales Invoice" + }, + { + "type": "report", + "name": "Purchase Order Items To Be Billed", + "is_query_report": True, + "reference_doctype": "Purchase Invoice" + }, + { + "type": "report", + "name": "Received Items To Be Billed", + "is_query_report": True, + "reference_doctype": "Purchase Invoice" + }, + ] + + }, + { + "label": _("Setup"), + "icon": "fa fa-cog", + "items": [ + { + "type": "doctype", + "name": "Opening Invoice Creation Tool", + "description": _("Create Opening Sales and Purchase Invoices") + }, + { + "type": "doctype", + "name": "Accounts Settings", + "description": _("Default settings for accounting transactions.") + }, + { + "type": "doctype", + "name": "Fiscal Year", + "description": _("Financial / accounting year.") + }, + { + "type": "doctype", + "name": "Currency", + "description": _("Enable / disable currencies.") + }, + { + "type": "doctype", + "name": "Currency Exchange", + "description": _("Currency exchange rate master.") + }, + { + "type": "doctype", + "name": "Payment Gateway Account", + "description": _("Setup Gateway accounts.") + }, + { + "type": "doctype", + "name": "Terms and Conditions", + "label": _("Terms and Conditions Template"), + "description": _("Template of terms or contract.") + }, + { + "type": "doctype", + "name": "Mode of Payment", + "description": _("e.g. Bank, Cash, Credit Card") + }, + { + "type": "doctype", + "name": "Auto Repeat", + "label": _("Auto Repeat"), + "description": _("To make recurring documents") + }, + { + "type": "doctype", + "name": "C-Form", + "description": _("C-Form records"), + "country": "India" + } + ] + }, + { + "label": _("Financial Statements"), + "items": [ { "type": "report", "name": "General Ledger", "doctype": "GL Entry", "is_query_report": True, + "onboard": 1, }, - ] - }, - { - "label": _("Masters"), - "items": [ - { - "type": "doctype", - "name": "Customer", - "description": _("Customer database.") - }, - { - "type": "doctype", - "name": "Supplier", - "description": _("Supplier database.") - }, - { - "type": "doctype", - "name": "Item", - } - ] - }, - { - "label": _("Accounting Statements"), - "items": [ { "type": "report", "name": "Accounts Receivable", @@ -193,22 +287,10 @@ def get_data(): "name": "Tax Withholding Category", "description": _("Tax Withholding rates to be applied on transactions.") }, - { - "type": "report", - "name": "Sales Register", - "doctype": "Sales Invoice", - "is_query_report": True - }, - { - "type": "report", - "name": "Purchase Register", - "doctype": "Purchase Invoice", - "is_query_report": True - }, ] }, { - "label": _("Budget and Cost Center"), + "label": _("Cost Center and Budgeting"), "items": [ { "type": "doctype", @@ -234,11 +316,6 @@ def get_data(): "name": "Monthly Distribution", "description": _("Seasonality for setting budgets, targets etc.") }, - ] - }, - { - "label": _("Tools"), - "items": [ { "type": "doctype", "name": "Period Closing Voucher", @@ -249,99 +326,10 @@ def get_data(): "name": "Cheque Print Template", "description": _("Setup cheque dimensions for printing") }, - { - "type": "doctype", - "name": "Opening Invoice Creation Tool", - "description": _("Create Opening Sales and Purchase Invoices") - }, ] }, { - "label": _("Setup"), - "icon": "fa fa-cog", - "items": [ - { - "type": "doctype", - "name": "Accounts Settings", - "description": _("Default settings for accounting transactions.") - }, - { - "type": "doctype", - "name": "Fiscal Year", - "description": _("Financial / accounting year.") - }, - { - "type": "doctype", - "name": "Currency", - "description": _("Enable / disable currencies.") - }, - { - "type": "doctype", - "name": "Currency Exchange", - "description": _("Currency exchange rate master.") - }, - { - "type": "doctype", - "name": "Payment Gateway Account", - "description": _("Setup Gateway accounts.") - }, - { - "type": "doctype", - "name": "Terms and Conditions", - "label": _("Terms and Conditions Template"), - "description": _("Template of terms or contract.") - }, - { - "type": "doctype", - "name": "Mode of Payment", - "description": _("e.g. Bank, Cash, Credit Card") - }, - { - "type": "doctype", - "name": "Auto Repeat", - "label": _("Auto Repeat"), - "description": _("To make recurring documents") - }, - { - "type": "doctype", - "name": "C-Form", - "description": _("C-Form records"), - "country": "India" - } - ] - }, - { - "label": _("To Bill"), - "items": [ - { - "type": "report", - "name": "Ordered Items To Be Billed", - "is_query_report": True, - "doctype": "Sales Invoice" - }, - { - "type": "report", - "name": "Delivered Items To Be Billed", - "is_query_report": True, - "doctype": "Sales Invoice" - }, - { - "type": "report", - "name": "Purchase Order Items To Be Billed", - "is_query_report": True, - "doctype": "Purchase Invoice" - }, - { - "type": "report", - "name": "Received Items To Be Billed", - "is_query_report": True, - "doctype": "Purchase Invoice" - }, - ] - - }, - { - "label": _("Analytics"), + "label": _("Key Reports"), "items": [ { "type": "report", @@ -349,6 +337,18 @@ def get_data(): "doctype": "Sales Invoice", "is_query_report": True }, + { + "type": "report", + "name": "Sales Register", + "doctype": "Sales Invoice", + "is_query_report": True + }, + { + "type": "report", + "name": "Purchase Register", + "doctype": "Purchase Invoice", + "is_query_report": True + }, { "type": "report", "name": "Purchase Invoice Trends", @@ -572,7 +572,7 @@ def get_data(): config.insert(7, gst) domains = frappe.get_active_domains() if "Services" in domains: - config.insert(2, subscriptions) + config.insert(5, subscriptions) else: config.insert(7, subscriptions) return config diff --git a/erpnext/config/assets.py b/erpnext/config/assets.py index 08e28a0548..3c9452f5a4 100644 --- a/erpnext/config/assets.py +++ b/erpnext/config/assets.py @@ -9,19 +9,27 @@ def get_data(): { "type": "doctype", "name": "Asset", + "onboard": 1, }, { "type": "doctype", "name": "Location", + "onboard": 1, }, { "type": "doctype", "name": "Asset Category", + "onboard": 1, }, { "type": "doctype", "name": "Asset Settings", - } + }, + { + "type": "doctype", + "name": "Asset Movement", + "description": _("Transfer an asset from one warehouse to another") + }, ] }, { @@ -30,36 +38,34 @@ def get_data(): { "type": "doctype", "name": "Asset Maintenance Team", + "onboard": 1, }, { "type": "doctype", "name": "Asset Maintenance", + "onboard": 1, + "dependencies": ["Asset Maintenance Team"], }, { "type": "doctype", "name": "Asset Maintenance Tasks", + "onboard": 1, + "dependencies": ["Asset Maintenance"], }, { "type": "doctype", "name": "Asset Maintenance Log", + "dependencies": ["Asset Maintenance"], }, { "type": "doctype", "name": "Asset Value Adjustment", + "dependencies": ["Asset"], }, { "type": "doctype", "name": "Asset Repair", - }, - ] - }, - { - "label": _("Tools"), - "items": [ - { - "type": "doctype", - "name": "Asset Movement", - "description": _("Transfer an asset from one warehouse to another") + "dependencies": ["Asset"], }, ] }, @@ -72,17 +78,20 @@ def get_data(): "name": "Asset Depreciation Ledger", "doctype": "Asset", "is_query_report": True, + "dependencies": ["Asset"], }, { "type": "report", "name": "Asset Depreciations and Balances", "doctype": "Asset", "is_query_report": True, + "dependencies": ["Asset"], }, { "type": "report", "name": "Asset Maintenance", - "doctype": "Asset Maintenance" + "doctype": "Asset Maintenance", + "dependencies": ["Asset Maintenance"] }, ] } diff --git a/erpnext/config/buying.py b/erpnext/config/buying.py index 13a1c97b20..735d7b909e 100644 --- a/erpnext/config/buying.py +++ b/erpnext/config/buying.py @@ -12,12 +12,6 @@ def get_data(): "onboard": 1, "description": _("All Products or Services."), }, - { - "type": "doctype", - "name": "Price List", - "onboard": 1, - "description": _("Price List master.") - }, { "type": "doctype", "name": "Item Price", @@ -25,6 +19,11 @@ def get_data(): "onboard": 1, "route": "Report/Item Price" }, + { + "type": "doctype", + "name": "Price List", + "description": _("Price List master.") + }, { "type": "doctype", "name": "Product Bundle", @@ -43,22 +42,30 @@ def get_data(): "name": "Pricing Rule", "description": _("Rules for applying pricing and discount.") }, - ] }, { "label": _("Purchasing"), "icon": "fa fa-star", "items": [ + { + "type": "doctype", + "name": "Purchase Order", + "onboard": 1, + "dependencies": ["Item", "Supplier"], + "description": _("Purchase Orders given to Suppliers."), + }, { "type": "doctype", "name": "Material Request", + "onboard": 1, "dependencies": ["Item"], "description": _("Request for purchase."), }, { "type": "doctype", "name": "Request for Quotation", + "onboard": 1, "dependencies": ["Item", "Supplier"], "description": _("Request for quotation."), }, @@ -68,12 +75,6 @@ def get_data(): "dependencies": ["Item", "Supplier"], "description": _("Quotations received from Suppliers."), }, - { - "type": "doctype", - "name": "Purchase Order", - "dependencies": ["Item", "Supplier"], - "description": _("Purchase Orders given to Suppliers."), - }, ] }, { @@ -110,6 +111,7 @@ def get_data(): { "type": "doctype", "name": "Buying Settings", + "onboard": 1, "description": _("Default settings for buying transactions.") }, { @@ -133,19 +135,22 @@ def get_data(): "type": "report", "is_query_report": True, "name": "Purchase Analytics", - "doctype": "Purchase Order" + "reference_doctype": "Purchase Order", + "onboard": 1 }, { "type": "report", "is_query_report": True, "name": "Supplier-Wise Sales Analytics", - "doctype": "Stock Ledger Entry" + "reference_doctype": "Stock Ledger Entry", + "onboard": 1 }, { "type": "report", "is_query_report": True, "name": "Purchase Order Trends", - "doctype": "Purchase Order" + "reference_doctype": "Purchase Order", + "onboard": 1, }, ] }, @@ -183,32 +188,35 @@ def get_data(): "type": "report", "is_query_report": True, "name": "Items To Be Requested", - "doctype": "Item" + "reference_doctype": "Item", + "onboard": 1, }, { "type": "report", "is_query_report": True, "name": "Requested Items To Be Ordered", - "doctype": "Material Request" - }, - { - "type": "report", - "is_query_report": True, - "name": "Material Requests for which Supplier Quotations are not created", - "doctype": "Material Request" + "reference_doctype": "Material Request", + "onboard": 1, }, { "type": "report", "is_query_report": True, "name": "Item-wise Purchase History", - "doctype": "Item" + "reference_doctype": "Item", + "onboard": 1, + }, + { + "type": "report", + "is_query_report": True, + "name": "Material Requests for which Supplier Quotations are not created", + "reference_doctype": "Material Request" }, { "type": "report", "is_query_report": True, "name": "Address And Contacts", "label": "Supplier Addresses And Contacts", - "doctype": "Address", + "reference_doctype": "Address", "route_options": { "party_type": "Supplier" } diff --git a/erpnext/config/crm.py b/erpnext/config/crm.py index 1f0cdf64b6..3ea0d9c083 100644 --- a/erpnext/config/crm.py +++ b/erpnext/config/crm.py @@ -11,21 +11,25 @@ def get_data(): "type": "doctype", "name": "Lead", "description": _("Database of potential customers."), + "onboard": 1, }, { "type": "doctype", "name": "Opportunity", "description": _("Potential opportunities for selling."), + "onboard": 1, }, { "type": "doctype", "name": "Customer", "description": _("Customer database."), + "onboard": 1, }, { "type": "doctype", "name": "Contact", "description": _("All Contacts."), + "onboard": 1, }, { "type": "doctype", @@ -46,6 +50,7 @@ def get_data(): "type": "doctype", "name": "Issue", "description": _("Support queries from customers."), + "onboard": 1, }, { "type": "doctype", @@ -72,13 +77,15 @@ def get_data(): "type": "report", "name": "Minutes to First Response for Issues", "doctype": "Issue", - "is_query_report": True + "is_query_report": True, + "dependencies": ["Issue"], }, { "type": "report", "name": "Support Hours", "doctype": "Issue", - "is_query_report": True + "is_query_report": True, + "dependencies": ["Issue"] }, ] }, @@ -90,6 +97,7 @@ def get_data(): "type": "doctype", "name": "Maintenance Schedule", "description": _("Plan for maintenance visits."), + "onboard": 1, }, { "type": "doctype", @@ -117,49 +125,57 @@ def get_data(): "type": "report", "is_query_report": True, "name": "Lead Details", - "doctype": "Lead" + "doctype": "Lead", + "onboard": 1, }, { "type": "page", "name": "sales-funnel", "label": _("Sales Funnel"), "icon": "fa fa-bar-chart", + "onboard": 1, }, { "type": "report", "name": "Prospects Engaged But Not Converted", "doctype": "Lead", - "is_query_report": True + "is_query_report": True, + "onboard": 1, }, { "type": "report", "name": "Minutes to First Response for Opportunity", "doctype": "Opportunity", - "is_query_report": True + "is_query_report": True, + "dependencies": ["Opportunity"] }, { "type": "report", "is_query_report": True, "name": "Customer Addresses And Contacts", - "doctype": "Contact" + "doctype": "Contact", + "dependencies": ["Customer"] }, { "type": "report", "is_query_report": True, "name": "Inactive Customers", - "doctype": "Sales Order" + "doctype": "Sales Order", + "dependencies": ["Sales Order"] }, { "type": "report", "is_query_report": True, "name": "Campaign Efficiency", - "doctype": "Lead" + "doctype": "Lead", + "dependencies": ["Lead"] }, { "type": "report", "is_query_report": True, "name": "Lead Owner Efficiency", - "doctype": "Lead" + "doctype": "Lead", + "dependencies": ["Lead"] } ] }, @@ -167,11 +183,6 @@ def get_data(): "label": _("Setup"), "icon": "fa fa-cog", "items": [ - { - "type": "doctype", - "name": "Campaign", - "description": _("Sales campaigns."), - }, { "type": "doctype", "label": _("Customer Group"), @@ -179,6 +190,7 @@ def get_data(): "icon": "fa fa-sitemap", "link": "Tree/Customer Group", "description": _("Manage Customer Group Tree."), + "onboard": 1, }, { "type": "doctype", @@ -187,6 +199,7 @@ def get_data(): "icon": "fa fa-sitemap", "link": "Tree/Territory", "description": _("Manage Territory Tree."), + "onboard": 1, }, { "type": "doctype", @@ -195,6 +208,12 @@ def get_data(): "icon": "fa fa-sitemap", "link": "Tree/Sales Person", "description": _("Manage Sales Person Tree."), + "onboard": 1, + }, + { + "type": "doctype", + "name": "Campaign", + "description": _("Sales campaigns."), }, { "type": "doctype", diff --git a/erpnext/config/desktop.py b/erpnext/config/desktop.py index 18132c63ba..f32de66da6 100644 --- a/erpnext/config/desktop.py +++ b/erpnext/config/desktop.py @@ -464,7 +464,7 @@ def get_data(): "icon": "octicon octicon-briefcase", "type": "module", "hidden": 1, - "description": "Purchasing, Suppliers and Products. Bluuuuu" + "description": "Purchasing, Suppliers and Products." }, { "module_name": "Stock", diff --git a/erpnext/config/hr.py b/erpnext/config/hr.py index 647d152e02..cf7612db39 100644 --- a/erpnext/config/hr.py +++ b/erpnext/config/hr.py @@ -201,10 +201,6 @@ def get_data(): "type": "doctype", "name": "Loan Application", }, - { - "type": "doctype", - "name": "Loan" - }, ] }, { diff --git a/erpnext/config/projects.py b/erpnext/config/projects.py index 2f8b92d3d8..ffd5ed4df7 100644 --- a/erpnext/config/projects.py +++ b/erpnext/config/projects.py @@ -11,29 +11,33 @@ def get_data(): "type": "doctype", "name": "Project", "description": _("Project master."), - }, - { - "type": "doctype", - "name": "Project Update", - "description": _("Project Update."), + "onboard": 1, }, { "type": "doctype", "name": "Task", "route": "List/Task", "description": _("Project activity / task."), - }, - { - "type": "doctype", - "name": "Project Type", - "description": _("Define Project type."), + "onboard": 1, }, { "type": "report", "route": "List/Task/Gantt", "doctype": "Task", "name": "Gantt Chart", - "description": _("Gantt chart of all tasks.") + "description": _("Gantt chart of all tasks."), + "onboard": 1, + }, + { + "type": "doctype", + "name": "Project Update", + "description": _("Project Update."), + "dependencies": ["Project"], + }, + { + "type": "doctype", + "name": "Project Type", + "description": _("Define Project type."), }, ] }, @@ -44,16 +48,19 @@ def get_data(): "type": "doctype", "name": "Timesheet", "description": _("Timesheet for tasks."), + "onboard": 1, }, { "type": "doctype", "name": "Activity Type", "description": _("Types of activities for Time Logs"), + "onboard": 1, }, { "type": "doctype", "name": "Activity Cost", "description": _("Cost of various activities"), + "dependencies": ["Activity Type"], }, ] }, @@ -65,13 +72,16 @@ def get_data(): "type": "report", "is_query_report": True, "name": "Daily Timesheet Summary", - "doctype": "Timesheet" + "doctype": "Timesheet", + "onboard": 1, + "dependencies": ["Timesheet"], }, { "type": "report", "is_query_report": True, "name": "Project wise Stock Tracking", - "doctype": "Project" + "doctype": "Project", + "dependencies": ["Project"], }, ] }, diff --git a/erpnext/config/selling.py b/erpnext/config/selling.py index 94f3102831..be44e4c7ba 100644 --- a/erpnext/config/selling.py +++ b/erpnext/config/selling.py @@ -7,25 +7,156 @@ def get_data(): "label": _("Sales"), "icon": "fa fa-star", "items": [ + { + "type": "doctype", + "name": "Customer", + "description": _("Customer database."), + "onboard": 1, + }, { "type": "doctype", "name": "Quotation", "description": _("Quotes to Leads or Customers."), + "onboard": 1, + "dependencies": ["Item", "Customer"], }, { "type": "doctype", "name": "Sales Order", "description": _("Confirmed orders from Customers."), + "onboard": 1, + "dependencies": ["Item", "Customer"], + }, + { + "type": "doctype", + "name": "Sales Partner", + "description": _("Manage Sales Partners."), + "dependencies": ["Item"], + }, + { + "type": "doctype", + "label": _("Sales Person"), + "name": "Sales Person", + "icon": "fa fa-sitemap", + "link": "Tree/Sales Person", + "description": _("Manage Sales Person Tree."), + "dependencies": ["Item", "Customer"], + }, + { + "type": "report", + "is_query_report": True, + "name": "Address And Contacts", + "label": _("Sales Partner Addresses And Contacts"), + "doctype": "Address", + "route_options": { + "party_type": "Sales Partner" + } + }, + { + "type": "report", + "is_query_report": True, + "name": "Territory Target Variance (Item Group-Wise)", + "route": "query-report/Territory Target Variance Item Group-Wise", + "doctype": "Territory", + }, + { + "type": "report", + "is_query_report": True, + "name": "Sales Person Target Variance (Item Group-Wise)", + "route": "query-report/Sales Person Target Variance Item Group-Wise", + "doctype": "Sales Person", + "dependencies": ["Sales Person"], }, ] }, { - "label": _("Customers"), + "label": _("Items and Pricing"), "items": [ { "type": "doctype", - "name": "Customer", - "description": _("Customer database."), + "name": "Item", + "description": _("All Products or Services."), + "onboard": 1, + }, + { + "type": "doctype", + "name": "Item Group", + "icon": "fa fa-sitemap", + "label": _("Item Group"), + "link": "Tree/Item Group", + "description": _("Tree of Item Groups."), + "onboard": 1, + }, + { + "type": "doctype", + "name": "Product Bundle", + "description": _("Bundle items at time of sale."), + "dependencies": ["Item"], + }, + { + "type": "doctype", + "name": "Price List", + "description": _("Price List master."), + "dependencies": ["Item"], + }, + { + "type": "doctype", + "name": "Item Price", + "description": _("Multiple Item prices."), + "route": "Report/Item Price", + "dependencies": ["Item", "Price List"], + }, + { + "type": "doctype", + "name": "Pricing Rule", + "description": _("Rules for applying pricing and discount."), + "dependencies": ["Item"], + }, + { + "type": "doctype", + "name": "Shipping Rule", + "description": _("Rules for adding shipping costs."), + }, + + ] + }, + { + "label": _("Setup"), + "icon": "fa fa-cog", + "items": [ + { + "type": "doctype", + "name": "Selling Settings", + "description": _("Default settings for selling transactions."), + "onboard": 1, + }, + { + "type": "doctype", + "name": "Campaign", + "description": _("Sales campaigns."), + "onboard": 1, + }, + { + "type": "doctype", + "name": "Industry Type", + "description": _("Track Leads by Industry Type."), + "onboard": 1, + }, + { + "type": "doctype", + "name":"Terms and Conditions", + "label": _("Terms and Conditions Template"), + "description": _("Template of terms or contract.") + }, + { + "type": "doctype", + "name": "Sales Taxes and Charges Template", + "description": _("Tax template for selling transactions.") + }, + { + "type": "doctype", + "name": "Lead Source", + "description": _("Track Leads by Lead Source.") }, { "type": "doctype", @@ -45,57 +176,6 @@ def get_data(): "name": "Address", "description": _("All Addresses."), }, - - ] - }, - { - "label": _("Items and Pricing"), - "items": [ - { - "type": "doctype", - "name": "Item", - "description": _("All Products or Services."), - }, - { - "type": "doctype", - "name": "Product Bundle", - "description": _("Bundle items at time of sale."), - }, - { - "type": "doctype", - "name": "Price List", - "description": _("Price List master.") - }, - { - "type": "doctype", - "name": "Item Group", - "icon": "fa fa-sitemap", - "label": _("Item Group"), - "link": "Tree/Item Group", - "description": _("Tree of Item Groups."), - }, - { - "type": "doctype", - "name": "Item Price", - "description": _("Multiple Item prices."), - "route": "Report/Item Price" - }, - { - "type": "doctype", - "name": "Shipping Rule", - "description": _("Rules for adding shipping costs.") - }, - { - "type": "doctype", - "name": "Pricing Rule", - "description": _("Rules for applying pricing and discount.") - }, - - ] - }, - { - "label": _("Sales Partners and Territory"), - "items": [ { "type": "doctype", "label": _("Territory"), @@ -104,80 +184,6 @@ def get_data(): "link": "Tree/Territory", "description": _("Manage Territory Tree."), }, - { - "type": "doctype", - "name": "Sales Partner", - "description": _("Manage Sales Partners."), - }, - { - "type": "doctype", - "label": _("Sales Person"), - "name": "Sales Person", - "icon": "fa fa-sitemap", - "link": "Tree/Sales Person", - "description": _("Manage Sales Person Tree."), - }, - { - "type": "report", - "is_query_report": True, - "name": "Address And Contacts", - "label": _("Sales Partner Addresses And Contacts"), - "doctype": "Address", - "route_options": { - "party_type": "Sales Partner" - } - }, - { - "type": "report", - "is_query_report": True, - "name": "Territory Target Variance (Item Group-Wise)", - "route": "query-report/Territory Target Variance Item Group-Wise", - "doctype": "Territory" - }, - { - "type": "report", - "is_query_report": True, - "name": "Sales Person Target Variance (Item Group-Wise)", - "route": "query-report/Sales Person Target Variance Item Group-Wise", - "doctype": "Sales Person", - }, - ] - }, - { - "label": _("Setup"), - "icon": "fa fa-cog", - "items": [ - { - "type": "doctype", - "name": "Selling Settings", - "description": _("Default settings for selling transactions.") - }, - { - "type": "doctype", - "name": "Campaign", - "description": _("Sales campaigns."), - }, - { - "type": "doctype", - "name":"Terms and Conditions", - "label": _("Terms and Conditions Template"), - "description": _("Template of terms or contract.") - }, - { - "type": "doctype", - "name": "Sales Taxes and Charges Template", - "description": _("Tax template for selling transactions.") - }, - { - "type": "doctype", - "name": "Industry Type", - "description": _("Track Leads by Industry Type.") - }, - { - "type": "doctype", - "name": "Lead Source", - "description": _("Track Leads by Lead Source.") - }, ] }, { @@ -188,13 +194,15 @@ def get_data(): "type": "report", "is_query_report": True, "name": "Sales Analytics", - "doctype": "Sales Order" + "doctype": "Sales Order", + "onboard": 1, }, { "type": "page", "name": "sales-funnel", "label": _("Sales Funnel"), "icon": "fa fa-bar-chart", + "onboard": 1, }, { "type": "report", @@ -293,27 +301,6 @@ def get_data(): }, ] }, - { - "label": _("SMS"), - "icon": "fa fa-wrench", - "items": [ - { - "type": "doctype", - "name": "SMS Center", - "description":_("Send mass SMS to your contacts"), - }, - { - "type": "doctype", - "name": "SMS Log", - "description":_("Logs for maintaining sms delivery status"), - }, - { - "type": "doctype", - "name": "SMS Settings", - "description": _("Setup SMS gateway settings") - }, - ] - }, { "label": _("Help"), "items": [ diff --git a/erpnext/config/stock.py b/erpnext/config/stock.py index 60eee71dfa..185d029bc0 100644 --- a/erpnext/config/stock.py +++ b/erpnext/config/stock.py @@ -9,18 +9,26 @@ def get_data(): { "type": "doctype", "name": "Stock Entry", + "onboard": 1, + "dependencies": ["Item"], }, { "type": "doctype", "name": "Delivery Note", + "onboard": 1, + "dependencies": ["Item", "Customer"], }, { "type": "doctype", "name": "Purchase Receipt", + "onboard": 1, + "dependencies": ["Item", "Supplier"], }, { "type": "doctype", "name": "Material Request", + "onboard": 1, + "dependencies": ["Item"], }, ] }, @@ -32,35 +40,44 @@ def get_data(): "is_query_report": True, "name": "Stock Ledger", "doctype": "Stock Ledger Entry", + "onboard": 1, + "dependencies": ["Item"], }, { "type": "report", "is_query_report": True, "name": "Stock Balance", - "doctype": "Stock Ledger Entry" + "doctype": "Stock Ledger Entry", + "onboard": 1, + "dependencies": ["Item"], }, { "type": "report", "is_query_report": True, "name": "Stock Projected Qty", "doctype": "Item", + "onboard": 1, + "dependencies": ["Item"], }, { "type": "page", "name": "stock-balance", - "label": _("Stock Summary") + "label": _("Stock Summary"), + "dependencies": ["Item"], }, { "type": "report", "is_query_report": True, "name": "Stock Ageing", "doctype": "Item", + "dependencies": ["Item"], }, { "type": "report", "is_query_report": True, "name": "Item Price Stock", "doctype": "Item", + "dependencies": ["Item"], } ] }, @@ -70,18 +87,12 @@ def get_data(): { "type": "doctype", "name": "Item", - }, - { - "type": "doctype", - "name": "Item Alternative", + "onboard": 1, }, { "type": "doctype", "name": "Product Bundle", - }, - { - "type": "doctype", - "name": "Price List", + "onboard": 1, }, { "type": "doctype", @@ -89,6 +100,11 @@ def get_data(): "icon": "fa fa-sitemap", "label": _("Item Group"), "link": "Tree/Item Group", + "onboard": 1, + }, + { + "type": "doctype", + "name": "Price List", }, { "type": "doctype", @@ -102,6 +118,10 @@ def get_data(): "type": "doctype", "name": "Pricing Rule", }, + { + "type": "doctype", + "name": "Item Alternative", + }, { "type": "doctype", "name": "Item Variant Settings", @@ -114,14 +134,19 @@ def get_data(): { "type": "doctype", "name": "Serial No", + "onboard": 1, + "dependencies": ["Item"], }, { "type": "doctype", "name": "Batch", + "onboard": 1, + "dependencies": ["Item"], }, { "type": "doctype", "name": "Installation Note", + "dependencies": ["Item"], }, { "type": "report", @@ -145,9 +170,14 @@ def get_data(): "items": [ { "type": "doctype", - "name": "Delivery Trip", - "description": _("Delivery Trip service tours to customers.") - } + "name": "Delivery Note", + "description": _("Delivery Trip service tours to customers."), + "onboard": 1 + }, + { + "type": "doctype", + "name": "Delivery Trip" + }, ] }, { @@ -157,14 +187,17 @@ def get_data(): { "type": "doctype", "name": "Stock Reconciliation", + "onboard": 1, }, { "type": "doctype", "name": "Packing Slip", + "onboard": 1, }, { "type": "doctype", "name": "Quality Inspection", + "onboard": 1, }, { "type": "doctype", @@ -183,23 +216,27 @@ def get_data(): { "type": "doctype", "name": "Stock Settings", + "onboard": 1, }, { "type": "doctype", "name": "Warehouse", + "onboard": 1, }, { "type": "doctype", "name": "UOM", "label": _("Unit of Measure") + " (UOM)", - }, - { - "type": "doctype", - "name": "Item Attribute", + "onboard": 1, }, { "type": "doctype", "name": "Brand", + "onboard": 1, + }, + { + "type": "doctype", + "name": "Item Attribute", }, { "type": "doctype", @@ -216,12 +253,14 @@ def get_data(): "is_query_report": False, "name": "Item-wise Price List Rate", "doctype": "Item Price", + "onboard": 1, }, { "type": "report", "is_query_report": True, "name": "Stock Analytics", - "doctype": "Stock Entry" + "doctype": "Stock Entry", + "onboard": 1, }, { "type": "report", From 9b14d46c1d6f03c899947d6c33d4d4ccbf5c5de4 Mon Sep 17 00:00:00 2001 From: Prateeksha Singh Date: Wed, 6 Feb 2019 17:15:19 +0530 Subject: [PATCH 6/7] purge(modules): remove old desktop icon configs --- erpnext/config/desktop.py | 523 -------------------------------------- 1 file changed, 523 deletions(-) diff --git a/erpnext/config/desktop.py b/erpnext/config/desktop.py index f32de66da6..b15e8ce41f 100644 --- a/erpnext/config/desktop.py +++ b/erpnext/config/desktop.py @@ -5,529 +5,6 @@ from frappe import _ def get_data(): return [ - { - "module_name": "Item", - "_doctype": "Item", - "color": "#f39c12", - "icon": "octicon octicon-package", - "type": "link", - "link": "List/Item" - }, - { - "module_name": "Customer", - "_doctype": "Customer", - "color": "#1abc9c", - "icon": "octicon octicon-tag", - "type": "link", - "link": "List/Customer" - }, - { - "module_name": "Supplier", - "_doctype": "Supplier", - "color": "#c0392b", - "icon": "octicon octicon-briefcase", - "type": "link", - "link": "List/Supplier" - }, - { - "_doctype": "Employee", - "module_name": "Employee", - "color": "#2ecc71", - "icon": "octicon octicon-organization", - "type": "link", - "link": "List/Employee" - }, - { - "module_name": "Projects", - "color": "#8e44ad", - "icon": "octicon octicon-rocket", - "type": "module", - }, - { - "module_name": "Issue", - "color": "#2c3e50", - "icon": "octicon octicon-issue-opened", - "_doctype": "Issue", - "type": "link", - "link": "List/Issue" - }, - { - "module_name": "Lead", - "icon": "octicon octicon-broadcast", - "_doctype": "Lead", - "type": "link", - "link": "List/Lead" - }, - { - "module_name": "Profit and Loss Statement", - "_doctype": "Account", - "color": "#3498db", - "icon": "octicon octicon-repo", - "type": "link", - "link": "query-report/Profit and Loss Statement" - }, - - # old - { - "module_name": "POS", - "color": "#589494", - "icon": "octicon octicon-credit-card", - "type": "page", - "link": "pos", - "label": _("POS") - }, - { - "module_name": "Leaderboard", - "color": "#589494", - "icon": "octicon octicon-graph", - "type": "page", - "link": "leaderboard", - "label": _("Leaderboard") - }, - { - "module_name": "Student", - "color": "#c0392b", - "icon": "octicon octicon-person", - "label": _("Student"), - "link": "List/Student", - "_doctype": "Student", - "type": "list", - "hidden": 1 - }, - { - "module_name": "Student Group", - "color": "#d59919", - "icon": "octicon octicon-organization", - "label": _("Student Group"), - "link": "List/Student Group", - "_doctype": "Student Group", - "type": "list", - "hidden": 1 - }, - { - "module_name": "Course Schedule", - "color": "#fd784f", - "icon": "octicon octicon-calendar", - "label": _("Course Schedule"), - "link": "List/Course Schedule/Calendar", - "_doctype": "Course Schedule", - "type": "list", - "hidden": 1 - }, - { - "module_name": "Student Attendance Tool", - "color": "#C0392B", - "icon": "octicon octicon-checklist", - "label": _("Student Attendance Tool"), - "link": "List/Student Attendance Tool", - "_doctype": "Student Attendance Tool", - "type": "list", - "hidden": 1 - }, - { - "module_name": "Course", - "color": "#8e44ad", - "icon": "octicon octicon-book", - "label": _("Course"), - "link": "List/Course", - "_doctype": "Course", - "type": "list", - "hidden": 1 - }, - { - "module_name": "Program", - "color": "#9b59b6", - "icon": "octicon octicon-repo", - "label": _("Program"), - "link": "List/Program", - "_doctype": "Program", - "type": "list", - "hidden": 1 - }, - { - "module_name": "Student Applicant", - "color": "#4d927f", - "icon": "octicon octicon-clippy", - "label": _("Student Applicant"), - "link": "List/Student Applicant", - "_doctype": "Student Applicant", - "type": "list", - "hidden": 1 - }, - { - "module_name": "Fees", - "color": "#83C21E", - "icon": "fa fa-money", - "label": _("Fees"), - "link": "List/Fees", - "_doctype": "Fees", - "type": "list", - "hidden": 1 - }, - { - "module_name": "Instructor", - "color": "#a99e4c", - "icon": "octicon octicon-broadcast", - "label": _("Instructor"), - "link": "List/Instructor", - "_doctype": "Instructor", - "type": "list", - "hidden": 1 - }, - { - "module_name": "Room", - "color": "#f22683", - "icon": "fa fa-map-marker", - "label": _("Room"), - "link": "List/Room", - "_doctype": "Room", - "type": "list", - "hidden": 1 - }, - { - "module_name": "Patient", - "color": "#6BE273", - "icon": "fa fa-user", - "doctype": "Patient", - "type": "link", - "link": "List/Patient", - "label": _("Patient"), - "hidden": 1 - }, - { - "module_name": "Healthcare Practitioner", - "color": "#2ecc71", - "icon": "fa fa-user-md", - "doctype": "Healthcare Practitioner", - "type": "link", - "link": "List/Healthcare Practitioner", - "label": _("Healthcare Practitioner"), - "hidden": 1 - }, - { - "module_name": "Patient Appointment", - "color": "#934F92", - "icon": "fa fa-calendar-plus-o", - "doctype": "Patient Appointment", - "type": "link", - "link": "List/Patient Appointment", - "label": _("Patient Appointment"), - "hidden": 1 - }, - { - "module_name": "Patient Encounter", - "color": "#2ecc71", - "icon": "fa fa-stethoscope", - "doctype": "Patient Encounter", - "type": "link", - "link": "List/Patient Encounter", - "label": _("Patient Encounter"), - "hidden": 1 - }, - { - "module_name": "Lab Test", - "color": "#7578f6", - "icon": "octicon octicon-beaker", - "doctype": "Lab Test", - "type": "list", - "link": "List/Lab Test", - "label": _("Lab Test"), - "hidden": 1 - }, - { - "module_name": "Vital Signs", - "color": "#2ecc71", - "icon": "fa fa-thermometer-empty", - "doctype": "Vital Signs", - "type": "list", - "link": "List/Vital Signs", - "label": _("Vital Signs"), - "hidden": 1 - }, - { - "module_name": "Clinical Procedure", - "color": "#FF888B", - "icon": "fa fa-medkit", - "doctype": "Clinical Procedure", - "type": "list", - "link": "List/Clinical Procedure", - "label": _("Clinical Procedure"), - "hidden": 1 - }, - { - "module_name": "Inpatient Record", - "color": "#7578f6", - "icon": "fa fa-list-alt", - "doctype": "Inpatient Record", - "type": "list", - "link": "List/Inpatient Record", - "label": _("Inpatient Record"), - "hidden": 1 - }, - { - "module_name": "Hub", - "color": "#009248", - "icon": "/assets/erpnext/images/hub_logo.svg", - "type": "page", - "link": "Hub/Item", - "label": _("Hub") - }, - { - "module_name": "Data Import", - "color": "#FFF168", - "reverse": 1, - "doctype": "Data Import", - "icon": "octicon octicon-cloud-upload", - "label": _("Data Import"), - "link": "List/Data Import", - "type": "list" - }, - { - "module_name": "Crop", - "_doctype": "Crop", - "label": _("Crop"), - "color": "#8BC34A", - "icon": "fa fa-tree", - "type": "list", - "link": "List/Crop", - "hidden": 1 - }, - { - "module_name": "Crop Cycle", - "_doctype": "Crop Cycle", - "label": _("Crop Cycle"), - "color": "#8BC34A", - "icon": "fa fa-circle-o-notch", - "type": "list", - "link": "List/Crop Cycle", - "hidden": 1 - }, - { - "module_name": "Fertilizer", - "_doctype": "Fertilizer", - "label": _("Fertilizer"), - "color": "#8BC34A", - "icon": "fa fa-leaf", - "type": "list", - "link": "List/Fertilizer", - "hidden": 1 - }, - { - "module_name": "Location", - "_doctype": "Location", - "label": _("Location"), - "color": "#8BC34A", - "icon": "fa fa-map", - "type": "list", - "link": "List/Location", - "hidden": 1 - }, - { - "module_name": "Disease", - "_doctype": "Disease", - "label": _("Disease"), - "color": "#8BC34A", - "icon": "octicon octicon-bug", - "type": "list", - "link": "List/Disease", - "hidden": 1 - }, - { - "module_name": "Plant Analysis", - "_doctype": "Plant Analysis", - "label": _("Plant Analysis"), - "color": "#8BC34A", - "icon": "fa fa-pagelines", - "type": "list", - "link": "List/Plant Analysis", - "hidden": 1 - }, - { - "module_name": "Soil Analysis", - "_doctype": "Soil Analysis", - "label": _("Soil Analysis"), - "color": "#8BC34A", - "icon": "fa fa-flask", - "type": "list", - "link": "List/Soil Analysis", - "hidden": 1 - }, - { - "module_name": "Soil Texture", - "_doctype": "Soil Texture", - "label": _("Soil Texture"), - "color": "#8BC34A", - "icon": "octicon octicon-beaker", - "type": "list", - "link": "List/Soil Texture", - "hidden": 1 - }, - { - "module_name": "Water Analysis", - "_doctype": "Water Analysis", - "label": _("Water Analysis"), - "color": "#8BC34A", - "icon": "fa fa-tint", - "type": "list", - "link": "List/Water Analysis", - "hidden": 1 - }, - { - "module_name": "Weather", - "_doctype": "Weather", - "label": _("Weather"), - "color": "#8BC34A", - "icon": "fa fa-sun-o", - "type": "list", - "link": "List/Weather", - "hidden": 1 - }, - { - "module_name": "Grant Application", - "color": "#E9AB17", - "icon": "fa fa-gift", - "_doctype": "Grant Application", - "type": "list", - "link": "List/Grant Application", - "label": _("Grant Application"), - "hidden": 1 - - }, - { - "module_name": "Donor", - "color": "#7F5A58", - "icon": "fa fa-tint", - "_doctype": "Donor", - "type": "list", - "link": "List/Donor", - "label": _("Donor"), - "hidden": 1 - }, - { - "module_name": "Volunteer", - "color": "#7E587E", - "icon": "fa fa-angellist", - "_doctype": "Volunteer", - "type": "list", - "link": "List/Volunteer", - "label": _("Volunteer"), - "hidden": 1 - }, - { - "module_name": "Member", - "color": "#79BAEC", - "icon": "fa fa-users", - "_doctype": "Member", - "type": "list", - "link": "List/Member", - "label": _("Member"), - "hidden": 1 - }, - { - "module_name": "Chapter", - "color": "#3B9C9C", - "icon": "fa fa-handshake-o", - "_doctype": "Chapter", - "type": "list", - "link": "List/Chapter", - "label": _("Chapter"), - "hidden": 1 - }, - - - # Modules - { - "module_name": "Accounting", - "category": "Modules", - "label": _("Accounting"), - "color": "#3498db", - "icon": "octicon octicon-repo", - "type": "module", - "hidden": 1, - "description": "Accounts, Banking, Ledgers and Statements, with Billings and Subscriptions." - }, - { - "module_name": "Selling", - "category": "Modules", - "label": _("Selling"), - "color": "#1abc9c", - "icon": "octicon octicon-tag", - "type": "module", - "hidden": 1, - "description": "All things Sales, Customer and Products." - }, - { - "module_name": "Buying", - "category": "Modules", - "label": _("Buying"), - "color": "#c0392b", - "icon": "octicon octicon-briefcase", - "type": "module", - "hidden": 1, - "description": "Purchasing, Suppliers and Products." - }, - { - "module_name": "Stock", - "category": "Modules", - "label": _("Stock"), - "color": "#f39c12", - "icon": "octicon octicon-package", - "type": "module", - "hidden": 1, - "description": "Track Stock Transactions, Reports, and Serialized Items and Batches." - }, - { - "module_name": "Assets", - "category": "Modules", - "label": _("Assets"), - "color": "#4286f4", - "icon": "octicon octicon-database", - "hidden": 1, - "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", From 3423407314d14ad5ad2776e1eec02b359eb869c2 Mon Sep 17 00:00:00 2001 From: Prateeksha Singh Date: Thu, 7 Feb 2019 09:18:24 +0530 Subject: [PATCH 7/7] feat(module_links): rearrange links --- erpnext/config/accounting.py | 134 +++++++----- erpnext/config/buying.py | 100 ++++----- erpnext/config/crm.py | 148 ++++++------- erpnext/config/desktop.py | 93 ++++++++ erpnext/config/hr.py | 304 ++++++++++++++------------- erpnext/config/manufacturing.py | 35 ++- erpnext/config/quality_management.py | 4 + erpnext/config/retail.py | 19 +- erpnext/config/selling.py | 110 +++++----- erpnext/config/settings.py | 6 +- erpnext/config/stock.py | 122 +++++------ erpnext/public/js/hub/hub_factory.js | 15 -- 12 files changed, 605 insertions(+), 485 deletions(-) diff --git a/erpnext/config/accounting.py b/erpnext/config/accounting.py index 0db5ff053b..a8b944705b 100644 --- a/erpnext/config/accounting.py +++ b/erpnext/config/accounting.py @@ -36,7 +36,7 @@ def get_data(): "name": "Account", "icon": "fa fa-sitemap", "label": _("Chart of Accounts"), - "route": "Tree/Account", + "route": "#Tree/Account", "description": _("Tree of financial accounts."), "onboard": 1, }, @@ -111,11 +111,6 @@ def get_data(): "label": _("Setup"), "icon": "fa fa-cog", "items": [ - { - "type": "doctype", - "name": "Opening Invoice Creation Tool", - "description": _("Create Opening Sales and Purchase Invoices") - }, { "type": "doctype", "name": "Accounts Settings", @@ -163,7 +158,12 @@ def get_data(): "name": "C-Form", "description": _("C-Form records"), "country": "India" - } + }, + { + "type": "doctype", + "name": "Cheque Print Template", + "description": _("Setup cheque dimensions for printing") + }, ] }, { @@ -223,6 +223,34 @@ def get_data(): { "label": _("Banking and Payments"), "items": [ + { + "type": "doctype", + "label": _("Bank"), + "name": "Bank", + }, + { + "type": "doctype", + "label": _("Bank Account"), + "name": "Bank Account", + }, + { + "type": "doctype", + "label": _("Bank Statement Transaction Entry List"), + "name": "Bank Statement Transaction Entry", + "route": "#List/Bank Statement Transaction Entry", + }, + { + "type": "doctype", + "label": _("Bank Statement Transaction Entry Report"), + "name": "Bank Statement Transaction Entry", + "route": "#Report/Bank Statement Transaction Entry", + }, + { + "type": "doctype", + "label": _("Bank Statement Settings"), + "name": "Bank Statement Settings", + }, + { "type": "doctype", "label": _("Update Bank Transaction Dates"), @@ -254,6 +282,40 @@ def get_data(): }, ] }, + { + "label": _("Cost Center and Budgeting"), + "items": [ + { + "type": "doctype", + "name": "Cost Center", + "icon": "fa fa-sitemap", + "label": _("Chart of Cost Centers"), + "route": "#Tree/Cost Center", + "description": _("Tree of financial Cost Centers."), + }, + { + "type": "doctype", + "name": "Budget", + "description": _("Define budget for a financial year.") + }, + { + "type": "report", + "name": "Budget Variance Report", + "is_query_report": True, + "doctype": "Cost Center" + }, + { + "type": "doctype", + "name": "Monthly Distribution", + "description": _("Seasonality for setting budgets, targets etc.") + }, + { + "type": "doctype", + "name": "Period Closing Voucher", + "description": _("Close Balance Sheet and book Profit or Loss.") + }, + ] + }, { "label": _("Taxes"), "items": [ @@ -290,42 +352,25 @@ def get_data(): ] }, { - "label": _("Cost Center and Budgeting"), + "label": _("Subscription Management"), + "icon": "fa fa-microchip ", "items": [ { "type": "doctype", - "name": "Cost Center", - "icon": "fa fa-sitemap", - "label": _("Chart of Cost Centers"), - "route": "Tree/Cost Center", - "description": _("Tree of financial Cost Centers."), + "name": "Subscriber", }, { "type": "doctype", - "name": "Budget", - "description": _("Define budget for a financial year.") - }, - { - "type": "report", - "name": "Budget Variance Report", - "is_query_report": True, - "doctype": "Cost Center" + "name": "Subscription Plan", }, { "type": "doctype", - "name": "Monthly Distribution", - "description": _("Seasonality for setting budgets, targets etc.") + "name": "Subscription" }, { "type": "doctype", - "name": "Period Closing Voucher", - "description": _("Close Balance Sheet and book Profit or Loss.") - }, - { - "type": "doctype", - "name": "Cheque Print Template", - "description": _("Setup cheque dimensions for printing") - }, + "name": "Subscription Settings" + } ] }, { @@ -542,37 +587,10 @@ def get_data(): ] } - subscriptions = { - "label": _("Subscription Management"), - "icon": "fa fa-microchip ", - "items": [ - { - "type": "doctype", - "name": "Subscriber", - }, - { - "type": "doctype", - "name": "Subscription Plan", - }, - { - "type": "doctype", - "name": "Subscription" - }, - { - "type": "doctype", - "name": "Subscription Settings" - } - ] - } - countries = frappe.get_all("Company", fields="country") countries = [country["country"] for country in countries] if "India" in countries: config.insert(7, gst) domains = frappe.get_active_domains() - if "Services" in domains: - config.insert(5, subscriptions) - else: - config.insert(7, subscriptions) return config diff --git a/erpnext/config/buying.py b/erpnext/config/buying.py index 735d7b909e..c52b9a2a1f 100644 --- a/erpnext/config/buying.py +++ b/erpnext/config/buying.py @@ -3,6 +3,39 @@ from frappe import _ def get_data(): return [ + { + "label": _("Purchasing"), + "icon": "fa fa-star", + "items": [ + { + "type": "doctype", + "name": "Purchase Order", + "onboard": 1, + "dependencies": ["Item", "Supplier"], + "description": _("Purchase Orders given to Suppliers."), + }, + { + "type": "doctype", + "name": "Material Request", + "onboard": 1, + "dependencies": ["Item"], + "description": _("Request for purchase."), + }, + { + "type": "doctype", + "name": "Request for Quotation", + "onboard": 1, + "dependencies": ["Item", "Supplier"], + "description": _("Request for quotation."), + }, + { + "type": "doctype", + "name": "Supplier Quotation", + "dependencies": ["Item", "Supplier"], + "description": _("Quotations received from Suppliers."), + }, + ] + }, { "label": _("Items and Pricing"), "items": [ @@ -45,35 +78,25 @@ def get_data(): ] }, { - "label": _("Purchasing"), - "icon": "fa fa-star", + "label": _("Setup"), + "icon": "fa fa-cog", "items": [ { "type": "doctype", - "name": "Purchase Order", + "name": "Buying Settings", "onboard": 1, - "dependencies": ["Item", "Supplier"], - "description": _("Purchase Orders given to Suppliers."), + "description": _("Default settings for buying transactions.") }, { "type": "doctype", - "name": "Material Request", - "onboard": 1, - "dependencies": ["Item"], - "description": _("Request for purchase."), + "name": "Purchase Taxes and Charges Template", + "description": _("Tax template for buying transactions.") }, { "type": "doctype", - "name": "Request for Quotation", - "onboard": 1, - "dependencies": ["Item", "Supplier"], - "description": _("Request for quotation."), - }, - { - "type": "doctype", - "name": "Supplier Quotation", - "dependencies": ["Item", "Supplier"], - "description": _("Quotations received from Suppliers."), + "name":"Terms and Conditions", + "label": _("Terms and Conditions Template"), + "description": _("Template of terms or contract.") }, ] }, @@ -105,30 +128,7 @@ def get_data(): ] }, { - "label": _("Setup"), - "icon": "fa fa-cog", - "items": [ - { - "type": "doctype", - "name": "Buying Settings", - "onboard": 1, - "description": _("Default settings for buying transactions.") - }, - { - "type": "doctype", - "name":"Terms and Conditions", - "label": _("Terms and Conditions Template"), - "description": _("Template of terms or contract.") - }, - { - "type": "doctype", - "name": "Purchase Taxes and Charges Template", - "description": _("Tax template for buying transactions.") - }, - ] - }, - { - "label": _("Analytics"), + "label": _("Key Reports"), "icon": "fa fa-table", "items": [ { @@ -152,6 +152,13 @@ def get_data(): "reference_doctype": "Purchase Order", "onboard": 1, }, + { + "type": "report", + "is_query_report": True, + "name": "Requested Items To Be Ordered", + "reference_doctype": "Material Request", + "onboard": 1, + }, ] }, { @@ -191,13 +198,6 @@ def get_data(): "reference_doctype": "Item", "onboard": 1, }, - { - "type": "report", - "is_query_report": True, - "name": "Requested Items To Be Ordered", - "reference_doctype": "Material Request", - "onboard": 1, - }, { "type": "report", "is_query_report": True, diff --git a/erpnext/config/crm.py b/erpnext/config/crm.py index 3ea0d9c083..3119824fdb 100644 --- a/erpnext/config/crm.py +++ b/erpnext/config/crm.py @@ -43,80 +43,6 @@ def get_data(): }, ] }, - { - "label": _("Support"), - "items": [ - { - "type": "doctype", - "name": "Issue", - "description": _("Support queries from customers."), - "onboard": 1, - }, - { - "type": "doctype", - "name": "Communication", - "description": _("Communication log."), - }, - { - "type": "doctype", - "name": "Warranty Claim", - "description": _("Warranty Claim against Serial No."), - }, - { - "type": "doctype", - "name": "Serial No", - "description": _("Single unit of an Item."), - }, - { - "type": "page", - "name": "support-analytics", - "label": _("Support Analytics"), - "icon": "fa fa-bar-chart" - }, - { - "type": "report", - "name": "Minutes to First Response for Issues", - "doctype": "Issue", - "is_query_report": True, - "dependencies": ["Issue"], - }, - { - "type": "report", - "name": "Support Hours", - "doctype": "Issue", - "is_query_report": True, - "dependencies": ["Issue"] - }, - ] - }, - { - "label": _("Maintenance"), - "icon": "fa fa-star", - "items": [ - { - "type": "doctype", - "name": "Maintenance Schedule", - "description": _("Plan for maintenance visits."), - "onboard": 1, - }, - { - "type": "doctype", - "name": "Maintenance Visit", - "description": _("Visit report for maintenance call."), - }, - { - "type": "report", - "name": "Maintenance Schedules", - "is_query_report": True, - "doctype": "Maintenance Schedule" - }, - { - "type": "doctype", - "name": "Warranty Claim", - "description": _("Warranty Claim against Serial No."), - }, - ] - }, { "label": _("Reports"), "icon": "fa fa-list", @@ -232,6 +158,80 @@ def get_data(): } ] }, + { + "label": _("Support"), + "items": [ + { + "type": "doctype", + "name": "Issue", + "description": _("Support queries from customers."), + "onboard": 1, + }, + { + "type": "doctype", + "name": "Communication", + "description": _("Communication log."), + }, + { + "type": "doctype", + "name": "Warranty Claim", + "description": _("Warranty Claim against Serial No."), + }, + { + "type": "doctype", + "name": "Serial No", + "description": _("Single unit of an Item."), + }, + { + "type": "page", + "name": "support-analytics", + "label": _("Support Analytics"), + "icon": "fa fa-bar-chart" + }, + { + "type": "report", + "name": "Minutes to First Response for Issues", + "doctype": "Issue", + "is_query_report": True, + "dependencies": ["Issue"], + }, + { + "type": "report", + "name": "Support Hours", + "doctype": "Issue", + "is_query_report": True, + "dependencies": ["Issue"] + }, + ] + }, + { + "label": _("Maintenance"), + "icon": "fa fa-star", + "items": [ + { + "type": "doctype", + "name": "Maintenance Schedule", + "description": _("Plan for maintenance visits."), + "onboard": 1, + }, + { + "type": "doctype", + "name": "Maintenance Visit", + "description": _("Visit report for maintenance call."), + }, + { + "type": "report", + "name": "Maintenance Schedules", + "is_query_report": True, + "doctype": "Maintenance Schedule" + }, + { + "type": "doctype", + "name": "Warranty Claim", + "description": _("Warranty Claim against Serial No."), + }, + ] + }, # { # "label": _("Help"), # "items": [ diff --git a/erpnext/config/desktop.py b/erpnext/config/desktop.py index b15e8ce41f..8484c64c1a 100644 --- a/erpnext/config/desktop.py +++ b/erpnext/config/desktop.py @@ -5,6 +5,99 @@ from frappe import _ def get_data(): return [ + # Modules + { + "module_name": "Accounting", + "category": "Modules", + "label": _("Accounting"), + "color": "#3498db", + "icon": "octicon octicon-repo", + "type": "module", + "hidden": 1, + "description": "Accounts, Billing, Payments, Cost Center and Budgeting." + }, + { + "module_name": "Selling", + "category": "Modules", + "label": _("Selling"), + "color": "#1abc9c", + "icon": "octicon octicon-tag", + "type": "module", + "hidden": 1, + "description": "All things Sales, Customer and Products." + }, + { + "module_name": "Buying", + "category": "Modules", + "label": _("Buying"), + "color": "#c0392b", + "icon": "octicon octicon-briefcase", + "type": "module", + "hidden": 1, + "description": "Purchasing, Suppliers and Products." + }, + { + "module_name": "Stock", + "category": "Modules", + "label": _("Stock"), + "color": "#f39c12", + "icon": "octicon octicon-package", + "type": "module", + "hidden": 1, + "description": "Track Stock Transactions, Reports, and Serialized Items and Batches." + }, + { + "module_name": "Assets", + "category": "Modules", + "label": _("Assets"), + "color": "#4286f4", + "icon": "octicon octicon-database", + "hidden": 1, + "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", diff --git a/erpnext/config/hr.py b/erpnext/config/hr.py index cf7612db39..93a9f4106d 100644 --- a/erpnext/config/hr.py +++ b/erpnext/config/hr.py @@ -9,83 +9,182 @@ def get_data(): { "type": "doctype", "name": "Employee", + "onboard": 1, }, { "type": "doctype", - "name": "Employee Transfer", + "name": "Employee Attendance Tool", + "hide_count": True, + "onboard": 1, + "dependencies": ["Employee"] }, { "type": "doctype", - "name": "Employee Promotion", + "name": "Attendance", + "onboard": 1, + "dependencies": ["Employee"] }, { "type": "doctype", - "name": "Employee Separation", + "name": "Attendance Request", + "dependencies": ["Employee"] }, { "type": "doctype", - "name": "Employee Onboarding" + "name": "Upload Attendance", + "hide_count": True, + "dependencies": ["Employee"] + }, + ] + }, + { + "label": _("Payroll"), + "items": [ + { + "type": "doctype", + "name": "Salary Structure", + "onboard": 1, }, { "type": "doctype", - "name": "Employee Separation Template", + "name": "Salary Structure Assignment", + "onboard": 1, + "dependencies": ["Salary Structure", "Employee"], }, { "type": "doctype", - "name": "Employee Onboarding Template" + "name": "Salary Slip", + "onboard": 1, + }, + { + "type": "doctype", + "name": "Payroll Entry", + "onboard": 1, + }, + { + "type": "doctype", + "name": "Employee Benefit Application", + "dependencies": ["Employee"] + }, + { + "type": "doctype", + "name": "Employee Benefit Claim", + "dependencies": ["Employee"] + }, + { + "type": "doctype", + "name": "Additional Salary", + }, + { + "type": "doctype", + "name": "Employee Tax Exemption Declaration", + "dependencies": ["Employee"] + }, + { + "type": "doctype", + "name": "Employee Tax Exemption Proof Submission", + "dependencies": ["Employee"] + }, + { + "type": "doctype", + "name": "Employee Incentive", + "dependencies": ["Employee"] + }, + { + "type": "doctype", + "name": "Retention Bonus", + "dependencies": ["Employee"] + }, + { + "type": "doctype", + "name": "Payroll Period", + }, + { + "type": "doctype", + "name": "Salary Component", + }, + ] + }, + { + "label": _("Setup"), + "icon": "fa fa-cog", + "items": [ + { + "type": "doctype", + "name": "HR Settings", + }, + { + "type": "doctype", + "name": "Employment Type", + }, + { + "type": "doctype", + "name": "Branch", + }, + { + "type": "doctype", + "name": "Department", + }, + { + "type": "doctype", + "name": "Designation", + }, + { + "type": "doctype", + "name": "Employee Grade", + }, + { + "type": "doctype", + "name": "Daily Work Summary Group" + }, + { + "type": "doctype", + "name": "Employee Health Insurance" + }, + { + "type": "doctype", + "name": "Staffing Plan", } ] }, { - "label": _("Attendance and Leaves"), + "label": _("Leaves"), "items": [ - { - "type": "doctype", - "name": "Employee Attendance Tool", - "hide_count": True - }, - { - "type": "doctype", - "name": "Attendance", - }, - { - "type": "doctype", - "name": "Attendance Request", - }, - { - "type": "doctype", - "name": "Upload Attendance", - "hide_count": True - }, { "type": "doctype", "name": "Leave Application", + "dependencies": ["Employee"] }, { "type": "doctype", "name": "Leave Allocation", + "dependencies": ["Employee"] }, { "type": "doctype", "name": "Compensatory Leave Request", + "dependencies": ["Employee"] }, { "type": "doctype", "name": "Leave Encashment", + "dependencies": ["Employee"] }, { "type": "doctype", "name": "Leave Period", - }, - { - "type": "doctype", - "name": "Leave Policy", + "dependencies": ["Employee"] }, { "type": "doctype", "name":"Leave Type", }, + { + "type": "doctype", + "name": "Leave Policy", + "dependencies": ["Leave Type"] + }, { "type": "doctype", "name": "Holiday List", @@ -97,68 +196,74 @@ def get_data(): ] }, { - "label": _("Payroll"), + "label": _("Recruitment and Training"), "items": [ { "type": "doctype", - "name": "Salary Structure Assignment", + "name": "Job Applicant", + "onboard": 1, }, { "type": "doctype", - "name": "Salary Slip", + "name": "Job Opening", + "onboard": 1, }, { "type": "doctype", - "name": "Payroll Entry" + "name": "Job Offer", + "onboard": 1, }, { "type": "doctype", - "name": "Employee Benefit Application", + "name": "Training Program" }, { "type": "doctype", - "name": "Employee Benefit Claim", + "name": "Training Event" }, { "type": "doctype", - "name": "Additional Salary", + "name": "Training Result" }, { "type": "doctype", - "name": "Employee Tax Exemption Declaration", + "name": "Training Feedback" + }, + ] + }, + { + "label": _("Employee Lifecycle"), + "items": [ + { + "type": "doctype", + "name": "Employee Transfer", + "dependencies": ["Employee"], }, { "type": "doctype", - "name": "Employee Tax Exemption Proof Submission", + "name": "Employee Promotion", + "dependencies": ["Employee"], }, { "type": "doctype", - "name": "Employee Incentive", + "name": "Employee Separation", + "dependencies": ["Employee"], }, { "type": "doctype", - "name": "Retention Bonus", + "name": "Employee Onboarding", + "dependencies": ["Job Applicant"], }, { "type": "doctype", - "name": "Payroll Period", + "name": "Employee Separation Template", + "dependencies": ["Employee"] }, { "type": "doctype", - "name": "Salary Component", - }, - { - "type": "doctype", - "name": "Salary Structure", - }, - # { - # "type": "doctype", - # "name": "Employee Tax Exemption Category", - # }, - # { - # "type": "doctype", - # "name": "Employee Tax Exemption Sub Category" - # } + "name": "Employee Onboarding Template", + "dependencies": ["Employee"] + } ] }, { @@ -180,18 +285,7 @@ def get_data(): { "type": "doctype", "name": "Employee Advance", - }, - { - "type": "doctype", - "name": "Expense Claim", - }, - { - "type": "doctype", - "name": "Expense Claim Type", - }, - { - "type": "doctype", - "name": "Travel Request", + "dependencies": ["Employee"] }, { "type": "doctype", @@ -200,39 +294,7 @@ def get_data(): { "type": "doctype", "name": "Loan Application", - }, - ] - }, - { - "label": _("Recruitment and Training"), - "items": [ - { - "type": "doctype", - "name": "Job Applicant", - }, - { - "type": "doctype", - "name": "Job Opening", - }, - { - "type": "doctype", - "name": "Job Offer", - }, - { - "type": "doctype", - "name": "Training Program" - }, - { - "type": "doctype", - "name": "Training Event" - }, - { - "type": "doctype", - "name": "Training Result" - }, - { - "type": "doctype", - "name": "Training Feedback" + "dependencies": ["Employee"] }, ] }, @@ -314,48 +376,6 @@ def get_data(): }, ] }, - { - "label": _("Setup"), - "icon": "fa fa-cog", - "items": [ - { - "type": "doctype", - "name": "HR Settings", - }, - { - "type": "doctype", - "name": "Employment Type", - }, - { - "type": "doctype", - "name": "Branch", - }, - { - "type": "doctype", - "name": "Department", - }, - { - "type": "doctype", - "name": "Designation", - }, - { - "type": "doctype", - "name": "Employee Grade", - }, - { - "type": "doctype", - "name": "Daily Work Summary Group" - }, - { - "type": "doctype", - "name": "Employee Health Insurance" - }, - { - "type": "doctype", - "name": "Staffing Plan", - } - ] - }, # { # "label": _("Help"), # "icon": "fa fa-facetime-video", diff --git a/erpnext/config/manufacturing.py b/erpnext/config/manufacturing.py index b6fa1cf17f..e1b6980ac5 100644 --- a/erpnext/config/manufacturing.py +++ b/erpnext/config/manufacturing.py @@ -11,32 +11,51 @@ def get_data(): "type": "doctype", "name": "Work Order", "description": _("Orders released for production."), + "onboard": 1, + "dependencies": ["Item", "BOM"] }, { "type": "doctype", "name": "Production Plan", "description": _("Generate Material Requests (MRP) and Work Orders."), + "onboard": 1, + "dependencies": ["Item", "BOM"] }, { "type": "doctype", "name": "Stock Entry", + "onboard": 1, + "dependencies": ["Item"] }, { "type": "doctype", "name": "Timesheet", "description": _("Time Sheet for manufacturing."), + "onboard": 1, + "dependencies": ["Activity Type"] }, - + { + "type": "doctype", + "name": "Job Card" + } ] }, { "label": _("Bill of Materials"), "items": [ + { + "type": "doctype", + "name": "Item", + "description": _("All Products or Services."), + "onboard": 1, + }, { "type": "doctype", "name": "BOM", "description": _("Bill of Materials (BOM)"), - "label": _("Bill of Materials") + "label": _("Bill of Materials"), + "onboard": 1, + "dependencies": ["Item"] }, { "type": "doctype", @@ -45,12 +64,10 @@ def get_data(): "label": _("BOM Browser"), "description": _("Tree of Bill of Materials"), "link": "Tree/BOM", + "onboard": 1, + "dependencies": ["Item"] }, - { - "type": "doctype", - "name": "Item", - "description": _("All Products or Services."), - }, + { "type": "doctype", "name": "Workstation", @@ -61,6 +78,10 @@ def get_data(): "name": "Operation", "description": _("Details of the operations carried out."), }, + { + "type": "doctype", + "name": "Routing" + } ] }, diff --git a/erpnext/config/quality_management.py b/erpnext/config/quality_management.py index a17b9f5541..5844846b1d 100644 --- a/erpnext/config/quality_management.py +++ b/erpnext/config/quality_management.py @@ -10,11 +10,13 @@ def get_data(): "type": "doctype", "name": "Quality Goal", "description":_("Quality Goal."), + "onboard": 1, }, { "type": "doctype", "name": "Quality Procedure", "description":_("Quality Procedure."), + "onboard": 1, }, { "type": "doctype", @@ -33,6 +35,7 @@ def get_data(): "type": "doctype", "name": "Quality Review", "description":_("Quality Review"), + "onboard": 1, }, { "type": "doctype", @@ -58,6 +61,7 @@ def get_data(): "type": "doctype", "name": "Customer Feedback", "description":_("Customer Feedback"), + "onboard": 1, }, { "type": "doctype", diff --git a/erpnext/config/retail.py b/erpnext/config/retail.py index 7852f3bf3f..738be7eb17 100644 --- a/erpnext/config/retail.py +++ b/erpnext/config/retail.py @@ -6,28 +6,31 @@ def get_data(): { "label": _("Retail Operations"), "items": [ + { + "type": "doctype", + "name": "POS Profile", + "label": _("Point-of-Sale Profile"), + "description": _("Setup default values for POS Invoices"), + "onboard": 1, + }, { "type": "page", "name": "pos", "label": _("POS"), - "description": _("Point of Sale") + "description": _("Point of Sale"), + "onboard": 1, + "dependencies": ["POS Profile"] }, { "type": "doctype", "name": "Cashier Closing", - "description": _("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", diff --git a/erpnext/config/selling.py b/erpnext/config/selling.py index be44e4c7ba..9e190a730a 100644 --- a/erpnext/config/selling.py +++ b/erpnext/config/selling.py @@ -42,16 +42,6 @@ def get_data(): "description": _("Manage Sales Person Tree."), "dependencies": ["Item", "Customer"], }, - { - "type": "report", - "is_query_report": True, - "name": "Address And Contacts", - "label": _("Sales Partner Addresses And Contacts"), - "doctype": "Address", - "route_options": { - "party_type": "Sales Partner" - } - }, { "type": "report", "is_query_report": True, @@ -78,6 +68,20 @@ def get_data(): "description": _("All Products or Services."), "onboard": 1, }, + { + "type": "doctype", + "name": "Item Price", + "description": _("Multiple Item prices."), + "route": "Report/Item Price", + "dependencies": ["Item", "Price List"], + "onboard": 1, + }, + { + "type": "doctype", + "name": "Price List", + "description": _("Price List master."), + "onboard": 1, + }, { "type": "doctype", "name": "Item Group", @@ -93,19 +97,6 @@ def get_data(): "description": _("Bundle items at time of sale."), "dependencies": ["Item"], }, - { - "type": "doctype", - "name": "Price List", - "description": _("Price List master."), - "dependencies": ["Item"], - }, - { - "type": "doctype", - "name": "Item Price", - "description": _("Multiple Item prices."), - "route": "Report/Item Price", - "dependencies": ["Item", "Price List"], - }, { "type": "doctype", "name": "Pricing Rule", @@ -130,28 +121,18 @@ def get_data(): "description": _("Default settings for selling transactions."), "onboard": 1, }, - { - "type": "doctype", - "name": "Campaign", - "description": _("Sales campaigns."), - "onboard": 1, - }, - { - "type": "doctype", - "name": "Industry Type", - "description": _("Track Leads by Industry Type."), - "onboard": 1, - }, { "type": "doctype", "name":"Terms and Conditions", "label": _("Terms and Conditions Template"), - "description": _("Template of terms or contract.") + "description": _("Template of terms or contract."), + "onboard": 1, }, { "type": "doctype", "name": "Sales Taxes and Charges Template", - "description": _("Tax template for selling transactions.") + "description": _("Tax template for selling transactions."), + "onboard": 1, }, { "type": "doctype", @@ -184,10 +165,15 @@ def get_data(): "link": "Tree/Territory", "description": _("Manage Territory Tree."), }, + { + "type": "doctype", + "name": "Campaign", + "description": _("Sales campaigns."), + }, ] }, { - "label": _("Analytics"), + "label": _("Key Reports"), "icon": "fa fa-table", "items": [ { @@ -211,6 +197,30 @@ def get_data(): "doctype": "Customer", "icon": "fa fa-bar-chart", }, + { + "type": "report", + "is_query_report": True, + "name": "Inactive Customers", + "doctype": "Sales Order" + }, + { + "type": "report", + "is_query_report": True, + "name": "Ordered Items To Be Delivered", + "doctype": "Sales Order" + }, + { + "type": "report", + "is_query_report": True, + "name": "Sales Person-wise Transaction Summary", + "doctype": "Sales Order" + }, + { + "type": "report", + "is_query_report": True, + "name": "Item-wise Sales History", + "doctype": "Item" + }, { "type": "report", "is_query_report": True, @@ -245,36 +255,12 @@ def get_data(): "party_type": "Customer" } }, - { - "type": "report", - "is_query_report": True, - "name": "Ordered Items To Be Delivered", - "doctype": "Sales Order" - }, - { - "type": "report", - "is_query_report": True, - "name": "Sales Person-wise Transaction Summary", - "doctype": "Sales Order" - }, - { - "type": "report", - "is_query_report": True, - "name": "Item-wise Sales History", - "doctype": "Item" - }, { "type": "report", "is_query_report": True, "name": "BOM Search", "doctype": "BOM" }, - { - "type": "report", - "is_query_report": True, - "name": "Inactive Customers", - "doctype": "Sales Order" - }, { "type": "report", "is_query_report": True, diff --git a/erpnext/config/settings.py b/erpnext/config/settings.py index 2978bc300e..0bbf6ec7ef 100644 --- a/erpnext/config/settings.py +++ b/erpnext/config/settings.py @@ -13,7 +13,8 @@ def get_data(): "name": "Global Defaults", "label": _("Global Settings"), "description": _("Set Default Values like Company, Currency, Current Fiscal Year, etc."), - "hide_count": True + "hide_count": True, + "onboard": 1, } ] }, @@ -24,7 +25,8 @@ def get_data(): { "type": "doctype", "name": "Letter Head", - "description": _("Letter Heads for print templates.") + "description": _("Letter Heads for print templates."), + "onboard": 1, }, { "type": "doctype", diff --git a/erpnext/config/stock.py b/erpnext/config/stock.py index 185d029bc0..6c06733d93 100644 --- a/erpnext/config/stock.py +++ b/erpnext/config/stock.py @@ -30,6 +30,10 @@ def get_data(): "onboard": 1, "dependencies": ["Item"], }, + { + "type": "doctype", + "name": "Delivery Trip" + }, ] }, { @@ -81,6 +85,41 @@ def get_data(): } ] }, + { + "label": _("Setup"), + "icon": "fa fa-cog", + "items": [ + { + "type": "doctype", + "name": "Stock Settings", + "onboard": 1, + }, + { + "type": "doctype", + "name": "Warehouse", + "onboard": 1, + }, + { + "type": "doctype", + "name": "UOM", + "label": _("Unit of Measure") + " (UOM)", + "onboard": 1, + }, + { + "type": "doctype", + "name": "Brand", + "onboard": 1, + }, + { + "type": "doctype", + "name": "Item Attribute", + }, + { + "type": "doctype", + "name": "Item Variant Settings", + }, + ] + }, { "label": _("Items and Pricing"), "items": [ @@ -165,21 +204,6 @@ def get_data(): }, ] }, - { - "label": _("Fulfilment"), - "items": [ - { - "type": "doctype", - "name": "Delivery Note", - "description": _("Delivery Trip service tours to customers."), - "onboard": 1 - }, - { - "type": "doctype", - "name": "Delivery Trip" - }, - ] - }, { "label": _("Tools"), "icon": "fa fa-wrench", @@ -189,6 +213,11 @@ def get_data(): "name": "Stock Reconciliation", "onboard": 1, }, + { + "type": "doctype", + "name": "Landed Cost Voucher", + "onboard": 1, + }, { "type": "doctype", "name": "Packing Slip", @@ -197,55 +226,15 @@ def get_data(): { "type": "doctype", "name": "Quality Inspection", - "onboard": 1, }, { "type": "doctype", "name": "Quality Inspection Template", }, - { - "type": "doctype", - "name": "Landed Cost Voucher", - } ] }, { - "label": _("Setup"), - "icon": "fa fa-cog", - "items": [ - { - "type": "doctype", - "name": "Stock Settings", - "onboard": 1, - }, - { - "type": "doctype", - "name": "Warehouse", - "onboard": 1, - }, - { - "type": "doctype", - "name": "UOM", - "label": _("Unit of Measure") + " (UOM)", - "onboard": 1, - }, - { - "type": "doctype", - "name": "Brand", - "onboard": 1, - }, - { - "type": "doctype", - "name": "Item Attribute", - }, - { - "type": "doctype", - "name": "Item Variant Settings", - }, - ] - }, - { - "label": _("Analytics"), + "label": _("Key Reports"), "icon": "fa fa-table", "items": [ { @@ -274,13 +263,6 @@ def get_data(): "name": "Purchase Receipt Trends", "doctype": "Purchase Receipt" }, - - ] - }, - { - "label": _("Reports"), - "icon": "fa fa-list", - "items": [ { "type": "report", "is_query_report": True, @@ -302,14 +284,20 @@ def get_data(): { "type": "report", "is_query_report": True, - "name": "Requested Items To Be Transferred", - "doctype": "Material Request" + "name": "Batch-Wise Balance History", + "doctype": "Batch" }, + ] + }, + { + "label": _("Other Reports"), + "icon": "fa fa-list", + "items": [ { "type": "report", "is_query_report": True, - "name": "Batch-Wise Balance History", - "doctype": "Batch" + "name": "Requested Items To Be Transferred", + "doctype": "Material Request" }, { "type": "report", diff --git a/erpnext/public/js/hub/hub_factory.js b/erpnext/public/js/hub/hub_factory.js index 2efc826110..8dab2d6251 100644 --- a/erpnext/public/js/hub/hub_factory.js +++ b/erpnext/public/js/hub/hub_factory.js @@ -36,18 +36,3 @@ function is_marketplace_disabled() { method: "erpnext.hub_node.doctype.marketplace_settings.marketplace_settings.is_marketplace_enabled" }).then(r => r.message) } - -$(document).on('toolbar_setup', () => { - $('#toolbar-user .navbar-reload').after(` -
  • - ${__('Marketplace')} -
  • - `); - - is_marketplace_disabled() - .then(disabled => { - if (disabled) { - $('#toolbar-user .marketplace-link').hide(); - } - }); -});