diff --git a/fleet_complete_report/README.rst b/fleet_complete_report/README.rst new file mode 100755 index 000000000..aa5b11435 --- /dev/null +++ b/fleet_complete_report/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Fleet Complete Report +======================= +This module allow to print complete fleet report. + +Configuration +============= +The user should be added to the security group: Administrator(Human Resources/ Fleet) inorder to get access to the new menu. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) + +Credits +------- +Developers: Version 15 - Abhishek E T @cybrosys, + Version 16 - Syamili K @cybrosys +Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/fleet_complete_report/__init__.py b/fleet_complete_report/__init__.py new file mode 100644 index 000000000..951d42ad1 --- /dev/null +++ b/fleet_complete_report/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies (). +# Author: Cybrosys Techno Solutions () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + + +from . import report +from . import wizard diff --git a/fleet_complete_report/__manifest__.py b/fleet_complete_report/__manifest__.py new file mode 100644 index 000000000..acf84f090 --- /dev/null +++ b/fleet_complete_report/__manifest__.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies (). +# Author: Cybrosys Techno Solutions () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +{ + 'name': 'Fleet Complete Report', + 'version': '16.0.1.0.0', + 'category': 'Human Resources/Fleet', + 'summary': 'Complete PDF report for Fleet', + 'description': 'Complete PDF report for Fleet', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'images': ['static/description/banner.png'], + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'fleet'], + 'data': [ + 'security/ir.model.access.csv', + 'report/vehicle_detail_report_templates.xml', + 'report/vehicle_detail_reports.xml', + 'wizard/vehicle_detail_views.xml' + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/fleet_complete_report/doc/RELEASE_NOTES.md b/fleet_complete_report/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..4f08bad96 --- /dev/null +++ b/fleet_complete_report/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 23.03.2023 +#### Version 16.0.1.0.0 +#### ADD + +- Initial commit for Fleet - Complete Report diff --git a/fleet_complete_report/report/__init__.py b/fleet_complete_report/report/__init__.py new file mode 100644 index 000000000..71648979c --- /dev/null +++ b/fleet_complete_report/report/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies (). +# Author: Cybrosys Techno Solutions () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +from . import vehicle_detail_report diff --git a/fleet_complete_report/report/vehicle_detail_report.py b/fleet_complete_report/report/vehicle_detail_report.py new file mode 100644 index 000000000..52566df65 --- /dev/null +++ b/fleet_complete_report/report/vehicle_detail_report.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies (). +# Author: Cybrosys Techno Solutions () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +from odoo import api, fields, models + + +class VehicleDetailReport(models.TransientModel): + _name = 'report.fleet_complete_report.report_vehicle_detail' + _description = 'Vehicle Details PDF Report' + + @api.model + def _get_report_values(self, docids, data=None): + """ + override the method to create custom report with custom values + :param docids: the recordset/ record from which the report action is + invoked + :param data: report data + :return: data and recodsets to be used in the report template + """ + docs = self.env['vehicle.detail'].browse( + self.env.context.get('active_id')) + lang = self.env['res.lang'].search( + [('code', '=', self.env.context.get('lang'))]) + vehicle_ids = data.get('vehicle_ids') + vehicles = docs.vehicle_ids.browse(vehicle_ids) + vehicles = vehicles.sorted(key=lambda rec: rec.state_id.sequence) + states = docs.state_ids.sorted(key=lambda rec: rec.sequence) + period = None + end_date = docs.end_date + if not end_date: + end_date = fields.Date.context_today(self) + if docs.start_date: + period = "From " + docs.start_date.strftime( + lang.date_format) + " To " + end_date.strftime(lang.date_format) + contracts = self.env['fleet.vehicle.log.contract'].sudo().search( + [('vehicle_id', 'in', vehicles.ids), + ('start_date', '<=', end_date), + '|', ('expiration_date', '>=', docs.start_date), + ('expiration_date', '=', False) + ], + order='vehicle_id ASC, state ASC, start_date DESC') + services = self.env['fleet.vehicle.log.services'].sudo().search( + [('vehicle_id', 'in', vehicles.ids), + ('date', '>=', docs.start_date), ('date', '<=', end_date)], + order='vehicle_id ASC, date DESC') + odometers = self.env['fleet.vehicle.odometer'].sudo().search( + [('vehicle_id', 'in', vehicles.ids), + ('date', '>=', docs.start_date), ('date', '<=', end_date)], + order='vehicle_id ASC, date DESC') + drivers_history = self.env[ + 'fleet.vehicle.assignation.log'].sudo().search( + [('vehicle_id', 'in', vehicles.ids), ('date_start', '<=', end_date), + '|', ('date_end', '>=', docs.start_date), + ('date_end', '=', False)], order='vehicle_id ASC, date_start ASC') + return { + 'doc_ids': self.ids, + 'docs': docs, + 'states': states, + 'state_names': ", ".join(states.mapped('name')), + 'vehicles': vehicles, + 'vehicle_names': ", ".join(vehicles.mapped('name')), + 'period': period, + 'contracts': contracts, + 'services': services, + 'odometers': odometers, + 'drivers_history': drivers_history + } diff --git a/fleet_complete_report/report/vehicle_detail_report_templates.xml b/fleet_complete_report/report/vehicle_detail_report_templates.xml new file mode 100644 index 000000000..b2558ed44 --- /dev/null +++ b/fleet_complete_report/report/vehicle_detail_report_templates.xml @@ -0,0 +1,315 @@ + + + + + diff --git a/fleet_complete_report/report/vehicle_detail_reports.xml b/fleet_complete_report/report/vehicle_detail_reports.xml new file mode 100644 index 000000000..f45786a78 --- /dev/null +++ b/fleet_complete_report/report/vehicle_detail_reports.xml @@ -0,0 +1,11 @@ + + + + + Fleet - Complete Report + vehicle.detail + qweb-pdf + fleet_complete_report.report_vehicle_detail + fleet_complete_report.report_vehicle_detail + + diff --git a/fleet_complete_report/security/ir.model.access.csv b/fleet_complete_report/security/ir.model.access.csv new file mode 100644 index 000000000..9b0ca5389 --- /dev/null +++ b/fleet_complete_report/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_vehicle_detail,access.vehicle.detail,model_vehicle_detail,base.group_user,1,1,1,1 diff --git a/fleet_complete_report/static/description/assets/icons/check.png b/fleet_complete_report/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/check.png differ diff --git a/fleet_complete_report/static/description/assets/icons/chevron.png b/fleet_complete_report/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/chevron.png differ diff --git a/fleet_complete_report/static/description/assets/icons/cogs.png b/fleet_complete_report/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/cogs.png differ diff --git a/fleet_complete_report/static/description/assets/icons/consultation.png b/fleet_complete_report/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/consultation.png differ diff --git a/fleet_complete_report/static/description/assets/icons/ecom-black.png b/fleet_complete_report/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/ecom-black.png differ diff --git a/fleet_complete_report/static/description/assets/icons/education-black.png b/fleet_complete_report/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/education-black.png differ diff --git a/fleet_complete_report/static/description/assets/icons/hotel-black.png b/fleet_complete_report/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/hotel-black.png differ diff --git a/fleet_complete_report/static/description/assets/icons/license.png b/fleet_complete_report/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/license.png differ diff --git a/fleet_complete_report/static/description/assets/icons/lifebuoy.png b/fleet_complete_report/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/lifebuoy.png differ diff --git a/fleet_complete_report/static/description/assets/icons/logo.png b/fleet_complete_report/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/logo.png differ diff --git a/fleet_complete_report/static/description/assets/icons/manufacturing-black.png b/fleet_complete_report/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/manufacturing-black.png differ diff --git a/fleet_complete_report/static/description/assets/icons/pos-black.png b/fleet_complete_report/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/pos-black.png differ diff --git a/fleet_complete_report/static/description/assets/icons/puzzle.png b/fleet_complete_report/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/puzzle.png differ diff --git a/fleet_complete_report/static/description/assets/icons/restaurant-black.png b/fleet_complete_report/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/restaurant-black.png differ diff --git a/fleet_complete_report/static/description/assets/icons/service-black.png b/fleet_complete_report/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/service-black.png differ diff --git a/fleet_complete_report/static/description/assets/icons/trading-black.png b/fleet_complete_report/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/trading-black.png differ diff --git a/fleet_complete_report/static/description/assets/icons/training.png b/fleet_complete_report/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/training.png differ diff --git a/fleet_complete_report/static/description/assets/icons/update.png b/fleet_complete_report/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/update.png differ diff --git a/fleet_complete_report/static/description/assets/icons/user.png b/fleet_complete_report/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/user.png differ diff --git a/fleet_complete_report/static/description/assets/icons/wrench.png b/fleet_complete_report/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/wrench.png differ diff --git a/fleet_complete_report/static/description/assets/misc/categories.png b/fleet_complete_report/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/fleet_complete_report/static/description/assets/misc/categories.png differ diff --git a/fleet_complete_report/static/description/assets/misc/check-box.png b/fleet_complete_report/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/fleet_complete_report/static/description/assets/misc/check-box.png differ diff --git a/fleet_complete_report/static/description/assets/misc/compass.png b/fleet_complete_report/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/fleet_complete_report/static/description/assets/misc/compass.png differ diff --git a/fleet_complete_report/static/description/assets/misc/corporate.png b/fleet_complete_report/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/fleet_complete_report/static/description/assets/misc/corporate.png differ diff --git a/fleet_complete_report/static/description/assets/misc/customer-support.png b/fleet_complete_report/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/fleet_complete_report/static/description/assets/misc/customer-support.png differ diff --git a/fleet_complete_report/static/description/assets/misc/cybrosys-logo.png b/fleet_complete_report/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/fleet_complete_report/static/description/assets/misc/cybrosys-logo.png differ diff --git a/fleet_complete_report/static/description/assets/misc/features.png b/fleet_complete_report/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/fleet_complete_report/static/description/assets/misc/features.png differ diff --git a/fleet_complete_report/static/description/assets/misc/logo.png b/fleet_complete_report/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/fleet_complete_report/static/description/assets/misc/logo.png differ diff --git a/fleet_complete_report/static/description/assets/misc/pictures.png b/fleet_complete_report/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/fleet_complete_report/static/description/assets/misc/pictures.png differ diff --git a/fleet_complete_report/static/description/assets/misc/pie-chart.png b/fleet_complete_report/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/fleet_complete_report/static/description/assets/misc/pie-chart.png differ diff --git a/fleet_complete_report/static/description/assets/misc/right-arrow.png b/fleet_complete_report/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/fleet_complete_report/static/description/assets/misc/right-arrow.png differ diff --git a/fleet_complete_report/static/description/assets/misc/star.png b/fleet_complete_report/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/fleet_complete_report/static/description/assets/misc/star.png differ diff --git a/fleet_complete_report/static/description/assets/misc/support.png b/fleet_complete_report/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/fleet_complete_report/static/description/assets/misc/support.png differ diff --git a/fleet_complete_report/static/description/assets/misc/whatsapp.png b/fleet_complete_report/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/fleet_complete_report/static/description/assets/misc/whatsapp.png differ diff --git a/fleet_complete_report/static/description/assets/modules/budget_image.png b/fleet_complete_report/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..b50130c7d Binary files /dev/null and b/fleet_complete_report/static/description/assets/modules/budget_image.png differ diff --git a/fleet_complete_report/static/description/assets/modules/credit_image.png b/fleet_complete_report/static/description/assets/modules/credit_image.png new file mode 100644 index 000000000..3ad04ecfd Binary files /dev/null and b/fleet_complete_report/static/description/assets/modules/credit_image.png differ diff --git a/fleet_complete_report/static/description/assets/modules/employee_image.png b/fleet_complete_report/static/description/assets/modules/employee_image.png new file mode 100644 index 000000000..30ad58232 Binary files /dev/null and b/fleet_complete_report/static/description/assets/modules/employee_image.png differ diff --git a/fleet_complete_report/static/description/assets/modules/export_image.png b/fleet_complete_report/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..492980ad0 Binary files /dev/null and b/fleet_complete_report/static/description/assets/modules/export_image.png differ diff --git a/fleet_complete_report/static/description/assets/modules/gantt_image.png b/fleet_complete_report/static/description/assets/modules/gantt_image.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/fleet_complete_report/static/description/assets/modules/gantt_image.png differ diff --git a/fleet_complete_report/static/description/assets/modules/quotation_image.png b/fleet_complete_report/static/description/assets/modules/quotation_image.png new file mode 100644 index 000000000..499b1a72f Binary files /dev/null and b/fleet_complete_report/static/description/assets/modules/quotation_image.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/fleet_1.png b/fleet_complete_report/static/description/assets/screenshots/fleet_1.png new file mode 100644 index 000000000..cde1277ff Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/fleet_1.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/fleet_10.png b/fleet_complete_report/static/description/assets/screenshots/fleet_10.png new file mode 100644 index 000000000..d75c9a20f Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/fleet_10.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/fleet_11.png b/fleet_complete_report/static/description/assets/screenshots/fleet_11.png new file mode 100644 index 000000000..20e2ee714 Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/fleet_11.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/fleet_2.png b/fleet_complete_report/static/description/assets/screenshots/fleet_2.png new file mode 100644 index 000000000..593ae2daa Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/fleet_2.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/fleet_3.png b/fleet_complete_report/static/description/assets/screenshots/fleet_3.png new file mode 100644 index 000000000..ffd146353 Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/fleet_3.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/fleet_4.png b/fleet_complete_report/static/description/assets/screenshots/fleet_4.png new file mode 100644 index 000000000..558f306c6 Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/fleet_4.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/fleet_5.png b/fleet_complete_report/static/description/assets/screenshots/fleet_5.png new file mode 100644 index 000000000..16c546079 Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/fleet_5.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/fleet_6.png b/fleet_complete_report/static/description/assets/screenshots/fleet_6.png new file mode 100644 index 000000000..65ac147e4 Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/fleet_6.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/fleet_7.png b/fleet_complete_report/static/description/assets/screenshots/fleet_7.png new file mode 100644 index 000000000..a988b82b5 Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/fleet_7.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/fleet_8.png b/fleet_complete_report/static/description/assets/screenshots/fleet_8.png new file mode 100644 index 000000000..330730363 Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/fleet_8.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/fleet_9.png b/fleet_complete_report/static/description/assets/screenshots/fleet_9.png new file mode 100644 index 000000000..b3ab7c0ac Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/fleet_9.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/hero.gif b/fleet_complete_report/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..4b82a4f50 Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/hero.gif differ diff --git a/fleet_complete_report/static/description/banner.png b/fleet_complete_report/static/description/banner.png new file mode 100644 index 000000000..1b74092f0 Binary files /dev/null and b/fleet_complete_report/static/description/banner.png differ diff --git a/fleet_complete_report/static/description/icon.png b/fleet_complete_report/static/description/icon.png new file mode 100644 index 000000000..cb1119f59 Binary files /dev/null and b/fleet_complete_report/static/description/icon.png differ diff --git a/fleet_complete_report/static/description/index.html b/fleet_complete_report/static/description/index.html new file mode 100644 index 000000000..d87559deb --- /dev/null +++ b/fleet_complete_report/static/description/index.html @@ -0,0 +1,757 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+
+ + + +

+ Fleet - Complete Report +

+

+ This module allows to generate complete PDF report for Fleet

. + + + + +
+ + +
+
+ +
+

+ Explore This + Module +

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This module crafted by Cybrosys Technologies provides an option to generate custom PDF report in Fleet with + vehicle details, contracts, services, odometer readings and drivers history for the selected period. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ +
+ +

+ New wizard

+

+ Use the new wizard that can be used to generate custom report. +

+
+
+
+
+ +
+ +

+ Detailed Report

+

+ The PDF report that contains vehicle details, contracts, services, odometer readings and drivers history for the selected vehicles. +

+
+
+
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+

+ Configuration

+

The user should be added to the security group: Administrator(Human Resources/ Fleet) inorder to get access to the new menu.

+ +
+
+

+ New menu

+

+ Fleet -> Reporting -> Vehicle Details. Use this menu to open the wizard. +

+ +
+
+

+ Wizard to create custom report

+

+ This wizard can be used to generate a custom PDF report for Fleet. We can specify Start Date and End Date to + filter the records based on the period. + The Start Date is a mandatory field. If we don't specify an End Date, then the current date will be taken. + Then we can choose the state of vehicles + for which we have to generate the report.The States field is also a required one. Then, we can select + Vehicles in the selected states. If we have + to print report for all vehicles for the selected states, leave Vehicles field as empty. Exclude Vehicle + Data checkbox will be checked by default. + Uncheck it to show the vehicle data in the report. +

+ +
+
+

+ Vehicles

+

+ The report starts with the details like the period, the selected states of vehicles and the list of + Vehicles. + The vehicle data will be displayed if Exclude Vehicle Data checkbox is unchecked. +

+ +
+ + +
+
+

+ Contracts

+

+ All the contracts of the listed vehicles in the selected period grouped by vehicles. +

+ +
+
+

+ Services

+

+ All the service records of the listed vehicles in the selected period grouped by vehicles with vehicle wise + total of service cost and the whole total. +

+ +
+
+

+ Odometers

+

+ All the odometer readings of the listed vehicles in the selected period grouped by vehicles. +

+ +
+
+

+ Drivers History

+

+ All the divers history of the listed vehicles in the selected period grouped by vehicles. +

+ +
+
+

+ Exclude Vehicle Data

+

+ Exclude Vehicle Data checkbox is checked by default. This will hide the vehicle data from the report. +

+ +
+
+

+ Then, the report will contain only the contracts, services, odometers and the drivers history. +

+ +
+
+ + + +
+
+ +
+

+ Related + Products +

+
+
+
+ +
+
+ + + + +
+
+ +
+

+ Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization +
+
+ +
+
+ +
+
+ Odoo + Implementation +
+
+ +
+
+ +
+
+ Odoo + Support +
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer +
+
+ +
+
+ +
+
+ Odoo + Integration +
+
+ +
+
+ +
+
+ Odoo + Migration +
+
+ + +
+
+ +
+
+ Odoo + Consultancy +
+
+ +
+
+ +
+
+ Odoo + Implementation +
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy +
+
+
+ +
+ + + + + +
+
+ +
+

+ Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products +

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience +

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management +

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations +

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages +

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice +

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically +

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application +

+
+
+
+
+ + + + +
+
+ +
+

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch. +

+ +

+ odoo@cybrosys.com +

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 + 27707 +

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/fleet_complete_report/wizard/__init__.py b/fleet_complete_report/wizard/__init__.py new file mode 100644 index 000000000..1f2382827 --- /dev/null +++ b/fleet_complete_report/wizard/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies (). +# Author: Cybrosys Techno Solutions () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +from . import vehicle_detail diff --git a/fleet_complete_report/wizard/vehicle_detail.py b/fleet_complete_report/wizard/vehicle_detail.py new file mode 100644 index 000000000..8453d2907 --- /dev/null +++ b/fleet_complete_report/wizard/vehicle_detail.py @@ -0,0 +1,95 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies (). +# Author: Cybrosys Techno Solutions () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +from odoo import api, fields, models + + +class VehicleDetail(models.TransientModel): + _name = 'vehicle.detail' + _description = 'Vehicle Details' + + vehicle_ids = fields.Many2many('fleet.vehicle', string='Vehicles', + domain="[('state_id', 'in', state_ids)]", + help="List of vehicles to generate report") + state_ids = fields.Many2many( + 'fleet.vehicle.state', string='States', required=True, + help='States of the vehicle') + start_date = fields.Date( + string='Start Date', required=True, default=fields.Date.context_today, + help='Start date to filter the records') + end_date = fields.Date( + string='End Date', equired=True, default=fields.Date.context_today, + help='End date to filter the records') + exclude_vehicle_data = fields.Boolean( + string='Exclude Vehicle Data', default=True, + help='Enable this to hide the vehicle data in the report') + + @api.onchange('start_date') + def _onchange_date_from(self): + """ + set valid start_date on changing it + """ + if not self.end_date: + if self.start_date and self.start_date > fields.Date.context_today( + self): + self.start_date = fields.Date.context_today(self) + else: + if self.start_date and self.start_date > self.end_date: + self.start_date = self.end_date + + @api.onchange('end_date') + def _onchange_date_to(self): + """ + set valid end_date on changing it + """ + if self.start_date and self.end_date and \ + self.start_date > self.end_date: + self.end_date = self.start_date + if self.end_date and self.end_date > fields.Date.context_today(self): + self.end_date = fields.Date.context_today(self) + + @api.onchange('state_ids') + def _onchange_state_ids(self): + """ + filter the vehicle_ids on changing the state_ids + """ + if self.state_ids: + self.vehicle_ids = self.vehicle_ids.filtered( + lambda vehicle: vehicle.state_id.id in self.state_ids.ids) + + def action_print_report(self): + """ + print PDF report for fleet based on selected data + :return: report action + """ + vehicles = self.vehicle_ids + if not self.vehicle_ids: + if self.state_ids: + vehicles = self.env['fleet.vehicle'].search( + [('state_id', 'in', self.state_ids.ids)]) + else: + vehicles = self.env['fleet.vehicle'].search([]) + data = {'vehicle_ids': vehicles.ids} + return self.env.ref( + 'fleet_complete_report.action_report_vehicle_detail').report_action( + self, data=data) diff --git a/fleet_complete_report/wizard/vehicle_detail_views.xml b/fleet_complete_report/wizard/vehicle_detail_views.xml new file mode 100644 index 000000000..7ac54866d --- /dev/null +++ b/fleet_complete_report/wizard/vehicle_detail_views.xml @@ -0,0 +1,44 @@ + + + + + vehicle.detail.view.form + vehicle.detail + +
+ + + + + + + + + + + +
+
+
+
+
+ + + + Vehicle Details + vehicle.detail + ir.actions.act_window + form + + new + + + + +