diff --git a/erpnext/config/hr.py b/erpnext/config/hr.py index 75ebd27cd4..3a18a27422 100644 --- a/erpnext/config/hr.py +++ b/erpnext/config/hr.py @@ -166,6 +166,21 @@ def get_data(): }, ] }, + + { + "label": _("Fleet Management"), + "items": [ + { + "type": "doctype", + "name": "Vehicle" + }, + { + "type": "doctype", + "name": "Vehicle Log" + }, + ] + }, + { "label": _("Setup"), @@ -241,6 +256,12 @@ def get_data(): "name": "Monthly Attendance Sheet", "doctype": "Attendance" }, + { + "type": "report", + "is_query_report": True, + "name": "Vehicle Expenses", + "doctype": "Vehicle" + }, ] }, diff --git a/erpnext/docs/assets/img/fleet-management/expense-claim-3.1.png b/erpnext/docs/assets/img/human-resources/expense-claim-3.1.png similarity index 100% rename from erpnext/docs/assets/img/fleet-management/expense-claim-3.1.png rename to erpnext/docs/assets/img/human-resources/expense-claim-3.1.png diff --git a/erpnext/docs/assets/img/fleet-management/expense-claim-3.2.png b/erpnext/docs/assets/img/human-resources/expense-claim-3.2.png similarity index 100% rename from erpnext/docs/assets/img/fleet-management/expense-claim-3.2.png rename to erpnext/docs/assets/img/human-resources/expense-claim-3.2.png diff --git a/erpnext/docs/assets/img/fleet-management/vehicle-1.1.png b/erpnext/docs/assets/img/human-resources/vehicle-1.1.png similarity index 100% rename from erpnext/docs/assets/img/fleet-management/vehicle-1.1.png rename to erpnext/docs/assets/img/human-resources/vehicle-1.1.png diff --git a/erpnext/docs/assets/img/fleet-management/vehicle-1.2.png b/erpnext/docs/assets/img/human-resources/vehicle-1.2.png similarity index 100% rename from erpnext/docs/assets/img/fleet-management/vehicle-1.2.png rename to erpnext/docs/assets/img/human-resources/vehicle-1.2.png diff --git a/erpnext/docs/assets/img/fleet-management/vehicle-1.3.png b/erpnext/docs/assets/img/human-resources/vehicle-1.3.png similarity index 100% rename from erpnext/docs/assets/img/fleet-management/vehicle-1.3.png rename to erpnext/docs/assets/img/human-resources/vehicle-1.3.png diff --git a/erpnext/docs/assets/img/fleet-management/vehicle-expenses.png b/erpnext/docs/assets/img/human-resources/vehicle-expenses.png similarity index 100% rename from erpnext/docs/assets/img/fleet-management/vehicle-expenses.png rename to erpnext/docs/assets/img/human-resources/vehicle-expenses.png diff --git a/erpnext/docs/assets/img/fleet-management/vehicle-log-2.1.png b/erpnext/docs/assets/img/human-resources/vehicle-log-2.1.png similarity index 100% rename from erpnext/docs/assets/img/fleet-management/vehicle-log-2.1.png rename to erpnext/docs/assets/img/human-resources/vehicle-log-2.1.png diff --git a/erpnext/docs/assets/img/fleet-management/vehicle-log-2.2.png b/erpnext/docs/assets/img/human-resources/vehicle-log-2.2.png similarity index 100% rename from erpnext/docs/assets/img/fleet-management/vehicle-log-2.2.png rename to erpnext/docs/assets/img/human-resources/vehicle-log-2.2.png diff --git a/erpnext/docs/user/manual/en/human-resources/fleet-management.md b/erpnext/docs/user/manual/en/human-resources/fleet-management.md new file mode 100644 index 0000000000..e55caa551d --- /dev/null +++ b/erpnext/docs/user/manual/en/human-resources/fleet-management.md @@ -0,0 +1,64 @@ +Fleet Management section of Human Resources helps your Organization manage their fleet of vehicles and track their expenses. + +To use Fleet Management in ERPNext, + + 1. Set Up a Vehicle. + 2. Enter Vehicle Logs regularly. + 3. Make Expense Claims for Vehicle Expenses. + 4. View Reports for Vehicle Expenses. + +### Vehicle Set Up + +The Vehicle Set Up allows you to define the different types of Vehicles in your Organization.It acts as the Vehicle Master for Fleet Management. + +To create a new Vehicle go to: + +Human Resources > Fleet Management > Vehicle + +* Enter License Plate, Make, Model, Odometer Value, Fuel Type and Fuel UOM for a quick entry. + + Vehicle + +* Enter details like Insurance, Chassis, Vehicle Value, Location and Employee. + + Vehicle + +* Enter Vehicle attributes like color, wheels, doors and last carbon check + + Vehicle + +### Vehicle Log + +Vehicle Log is used to enter Odometer readings, Fuel Expenses and Service Expense details. + +To create a new Vehicle Log go to: + +Human Resources > Fleet Management > Vehicle Log + +* Enter License Plate, Employee, Date, Odometer reading for a quick entry. + + Vehicle Log + +* Enter Refueling details, Service details if applicable. + + Vehicle Log + +### Make Expense Claim + +* Click on Make Expense Claim button. This button appears only in case of Submitted Vehicle Logs. + + Vehicle Log + +When you click on 'Make Expense Claim', + + 1. The date,employee,expense total are copied over to the created Expense Claim. + 2. The sum of Fuel Expenses and Service Expenses is copied over to Expense Claim Amount. + 3. Employee can submit the Expense Claim for further processing. + + Vehicle Log + +### Vehicle Expenses Report + +* To track and monitor Vehicle Expenses you can use the Vehicle Expenses report.This report gives a one stop view of all your vehicle expenses month wise. + + Vehicle Log diff --git a/erpnext/docs/user/manual/en/human-resources/index.txt b/erpnext/docs/user/manual/en/human-resources/index.txt index 56157906ba..f91edfaa3e 100644 --- a/erpnext/docs/user/manual/en/human-resources/index.txt +++ b/erpnext/docs/user/manual/en/human-resources/index.txt @@ -14,4 +14,5 @@ setup holiday-list human-resource-setup daily-work-summary +fleet-management articles diff --git a/erpnext/fleet_management/doctype/vehicle_log/__init__.py b/erpnext/fleet_management/doctype/vehicle_log/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/fleet_management/doctype/vehicle_service/__init__.py b/erpnext/fleet_management/doctype/vehicle_service/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/fleet_management/report/__init__.py b/erpnext/fleet_management/report/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/fleet_management/report/vehicle_expenses/__init__.py b/erpnext/fleet_management/report/vehicle_expenses/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/docs/assets/img/fleet-management/__init__.py b/erpnext/hr/doctype/vehicle/__init__.py similarity index 100% rename from erpnext/docs/assets/img/fleet-management/__init__.py rename to erpnext/hr/doctype/vehicle/__init__.py diff --git a/erpnext/fleet_management/doctype/vehicle/test_vehicle.py b/erpnext/hr/doctype/vehicle/test_vehicle.py similarity index 100% rename from erpnext/fleet_management/doctype/vehicle/test_vehicle.py rename to erpnext/hr/doctype/vehicle/test_vehicle.py diff --git a/erpnext/fleet_management/doctype/vehicle/vehicle.js b/erpnext/hr/doctype/vehicle/vehicle.js similarity index 100% rename from erpnext/fleet_management/doctype/vehicle/vehicle.js rename to erpnext/hr/doctype/vehicle/vehicle.js diff --git a/erpnext/fleet_management/doctype/vehicle/vehicle.json b/erpnext/hr/doctype/vehicle/vehicle.json similarity index 99% rename from erpnext/fleet_management/doctype/vehicle/vehicle.json rename to erpnext/hr/doctype/vehicle/vehicle.json index edad8a290a..39735e619e 100644 --- a/erpnext/fleet_management/doctype/vehicle/vehicle.json +++ b/erpnext/hr/doctype/vehicle/vehicle.json @@ -779,9 +779,9 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-11-07 06:00:22.056662", + "modified": "2017-01-09 11:10:11.678834", "modified_by": "Administrator", - "module": "Fleet Management", + "module": "HR", "name": "Vehicle", "name_case": "", "owner": "Administrator", @@ -815,5 +815,6 @@ "sort_field": "modified", "sort_order": "DESC", "title_field": "", + "track_changes": 1, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/fleet_management/doctype/vehicle/vehicle.py b/erpnext/hr/doctype/vehicle/vehicle.py similarity index 100% rename from erpnext/fleet_management/doctype/vehicle/vehicle.py rename to erpnext/hr/doctype/vehicle/vehicle.py diff --git a/erpnext/fleet_management/doctype/vehicle/vehicle_dashboard.py b/erpnext/hr/doctype/vehicle/vehicle_dashboard.py similarity index 100% rename from erpnext/fleet_management/doctype/vehicle/vehicle_dashboard.py rename to erpnext/hr/doctype/vehicle/vehicle_dashboard.py diff --git a/erpnext/fleet_management/__init__.py b/erpnext/hr/doctype/vehicle_log/__init__.py similarity index 100% rename from erpnext/fleet_management/__init__.py rename to erpnext/hr/doctype/vehicle_log/__init__.py diff --git a/erpnext/fleet_management/doctype/vehicle_log/test_vehicle_log.py b/erpnext/hr/doctype/vehicle_log/test_vehicle_log.py similarity index 100% rename from erpnext/fleet_management/doctype/vehicle_log/test_vehicle_log.py rename to erpnext/hr/doctype/vehicle_log/test_vehicle_log.py diff --git a/erpnext/fleet_management/doctype/vehicle_log/vehicle_log.js b/erpnext/hr/doctype/vehicle_log/vehicle_log.js similarity index 100% rename from erpnext/fleet_management/doctype/vehicle_log/vehicle_log.js rename to erpnext/hr/doctype/vehicle_log/vehicle_log.js diff --git a/erpnext/fleet_management/doctype/vehicle_log/vehicle_log.json b/erpnext/hr/doctype/vehicle_log/vehicle_log.json similarity index 99% rename from erpnext/fleet_management/doctype/vehicle_log/vehicle_log.json rename to erpnext/hr/doctype/vehicle_log/vehicle_log.json index 26a4a01885..a2cfa27615 100644 --- a/erpnext/fleet_management/doctype/vehicle_log/vehicle_log.json +++ b/erpnext/hr/doctype/vehicle_log/vehicle_log.json @@ -640,9 +640,9 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-11-07 05:24:55.310831", + "modified": "2017-01-09 11:10:21.208266", "modified_by": "Administrator", - "module": "Fleet Management", + "module": "HR", "name": "Vehicle Log", "name_case": "", "owner": "Administrator", @@ -675,5 +675,6 @@ "sort_field": "modified", "sort_order": "DESC", "title_field": "", + "track_changes": 1, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/fleet_management/doctype/vehicle_log/vehicle_log.py b/erpnext/hr/doctype/vehicle_log/vehicle_log.py similarity index 100% rename from erpnext/fleet_management/doctype/vehicle_log/vehicle_log.py rename to erpnext/hr/doctype/vehicle_log/vehicle_log.py diff --git a/erpnext/fleet_management/doctype/__init__.py b/erpnext/hr/doctype/vehicle_service/__init__.py similarity index 100% rename from erpnext/fleet_management/doctype/__init__.py rename to erpnext/hr/doctype/vehicle_service/__init__.py diff --git a/erpnext/fleet_management/doctype/vehicle_service/vehicle_service.json b/erpnext/hr/doctype/vehicle_service/vehicle_service.json similarity index 89% rename from erpnext/fleet_management/doctype/vehicle_service/vehicle_service.json rename to erpnext/hr/doctype/vehicle_service/vehicle_service.json index 6b80efccd3..635a0b6339 100644 --- a/erpnext/fleet_management/doctype/vehicle_service/vehicle_service.json +++ b/erpnext/hr/doctype/vehicle_service/vehicle_service.json @@ -22,6 +22,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Service Item", "length": 0, "no_copy": 0, @@ -31,6 +32,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -49,6 +51,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Type", "length": 0, "no_copy": 0, @@ -58,6 +61,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -76,6 +80,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Frequency", "length": 0, "no_copy": 0, @@ -85,6 +90,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -103,6 +109,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 1, + "in_standard_filter": 0, "label": "Expense", "length": 0, "no_copy": 0, @@ -111,6 +118,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -128,9 +136,9 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-09-20 07:29:50.852748", + "modified": "2017-01-09 11:10:29.476907", "modified_by": "Administrator", - "module": "Fleet Management", + "module": "HR", "name": "Vehicle Service", "name_case": "", "owner": "Administrator", @@ -140,5 +148,6 @@ "read_only_onload": 0, "sort_field": "modified", "sort_order": "DESC", + "track_changes": 1, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/fleet_management/doctype/vehicle_service/vehicle_service.py b/erpnext/hr/doctype/vehicle_service/vehicle_service.py similarity index 100% rename from erpnext/fleet_management/doctype/vehicle_service/vehicle_service.py rename to erpnext/hr/doctype/vehicle_service/vehicle_service.py diff --git a/erpnext/fleet_management/doctype/vehicle/__init__.py b/erpnext/hr/report/vehicle_expenses/__init__.py similarity index 100% rename from erpnext/fleet_management/doctype/vehicle/__init__.py rename to erpnext/hr/report/vehicle_expenses/__init__.py diff --git a/erpnext/fleet_management/report/vehicle_expenses/vehicle_expenses.js b/erpnext/hr/report/vehicle_expenses/vehicle_expenses.js similarity index 100% rename from erpnext/fleet_management/report/vehicle_expenses/vehicle_expenses.js rename to erpnext/hr/report/vehicle_expenses/vehicle_expenses.js diff --git a/erpnext/fleet_management/report/vehicle_expenses/vehicle_expenses.json b/erpnext/hr/report/vehicle_expenses/vehicle_expenses.json similarity index 83% rename from erpnext/fleet_management/report/vehicle_expenses/vehicle_expenses.json rename to erpnext/hr/report/vehicle_expenses/vehicle_expenses.json index 380c873df3..f151c6742a 100644 --- a/erpnext/fleet_management/report/vehicle_expenses/vehicle_expenses.json +++ b/erpnext/hr/report/vehicle_expenses/vehicle_expenses.json @@ -7,9 +7,9 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "modified": "2016-09-18 08:54:12.080753", + "modified": "2017-01-09 11:18:31.959124", "modified_by": "Administrator", - "module": "Fleet Management", + "module": "HR", "name": "Vehicle Expenses", "owner": "Administrator", "ref_doctype": "Vehicle", diff --git a/erpnext/fleet_management/report/vehicle_expenses/vehicle_expenses.py b/erpnext/hr/report/vehicle_expenses/vehicle_expenses.py similarity index 100% rename from erpnext/fleet_management/report/vehicle_expenses/vehicle_expenses.py rename to erpnext/hr/report/vehicle_expenses/vehicle_expenses.py diff --git a/erpnext/modules.txt b/erpnext/modules.txt index 4daf0eb591..609a3fe556 100644 --- a/erpnext/modules.txt +++ b/erpnext/modules.txt @@ -1,7 +1,6 @@ Accounts CRM Buying -Fleet Management Projects Selling Setup diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 14be685311..3e3c9edbd1 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -362,4 +362,5 @@ execute:frappe.delete_doc('Desktop Icon', {'module_name': 'Profit and Loss Statm erpnext.patches.v7_2.update_website_for_variant erpnext.patches.v7_2.update_assessment_modules erpnext.patches.v7_2.update_doctype_status -erpnext.patches.v7_2.update_salary_slips \ No newline at end of file +erpnext.patches.v7_2.update_salary_slips +erpnext.patches.v7_2.delete_fleet_management_module_def \ No newline at end of file diff --git a/erpnext/patches/v7_2/delete_fleet_management_module_def.py b/erpnext/patches/v7_2/delete_fleet_management_module_def.py new file mode 100644 index 0000000000..542ac11e3f --- /dev/null +++ b/erpnext/patches/v7_2/delete_fleet_management_module_def.py @@ -0,0 +1,10 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + if frappe.db.exists('Module Def', 'Fleet Management'): + frappe.db.sql("""delete from `tabModule Def` + where module_name = 'Fleet Management'""") \ No newline at end of file