diff --git a/fleet_complete_report/README.rst b/fleet_complete_report/README.rst new file mode 100755 index 000000000..8ebbee249 --- /dev/null +++ b/fleet_complete_report/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://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 +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +======= +General Public License, version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developer : (V17) Bhagyadev KP, +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..c4ab4b430 --- /dev/null +++ b/fleet_complete_report/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev KP (odoo@cybrosys.com) +# +# 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..54b485dd6 --- /dev/null +++ b/fleet_complete_report/__manifest__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev KP (odoo@cybrosys.com) +# +# 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': '17.0.1.0.0', + 'category': 'Human Resources', + 'summary': 'This module allow to print complete fleet report.', + 'description': 'This module allow to print complete fleet report, Which' + ' will show vehicle details, contract details, services and' + ' driver history', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['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.jpg'], + '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..2f5c22976 --- /dev/null +++ b/fleet_complete_report/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 24.01.2024 +#### Version 17.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..1f615c056 --- /dev/null +++ b/fleet_complete_report/report/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev KP (odoo@cybrosys.com) +# +# 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_vehicle_detail diff --git a/fleet_complete_report/report/report_vehicle_detail.py b/fleet_complete_report/report/report_vehicle_detail.py new file mode 100644 index 000000000..ef336fa6b --- /dev/null +++ b/fleet_complete_report/report/report_vehicle_detail.py @@ -0,0 +1,85 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev KP (odoo@cybrosys.com) +# +# 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 ReportVehicleDetail(models.TransientModel): + _name = 'report.fleet_complete_report.report_vehicle_detail' + _description = 'Vehicle Details 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..a91846b0c --- /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_user,access.vehicle.detail.user,model_vehicle_detail,base.group_user,1,1,1,1 diff --git a/fleet_complete_report/static/description/assets/icons/capture (1).png b/fleet_complete_report/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/capture (1).png differ 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/img.png b/fleet_complete_report/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/img.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/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/photo-capture.png b/fleet_complete_report/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/photo-capture.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/Cybrosys R.png b/fleet_complete_report/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/fleet_complete_report/static/description/assets/misc/Cybrosys R.png differ diff --git a/fleet_complete_report/static/description/assets/misc/email.svg b/fleet_complete_report/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/fleet_complete_report/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/misc/phone.svg b/fleet_complete_report/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/fleet_complete_report/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/fleet_complete_report/static/description/assets/misc/star (1) 2.svg b/fleet_complete_report/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/fleet_complete_report/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/misc/support (1) 1.svg b/fleet_complete_report/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/fleet_complete_report/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/misc/support-email.svg b/fleet_complete_report/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/fleet_complete_report/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/fleet_complete_report/static/description/assets/misc/tick-mark.svg b/fleet_complete_report/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/fleet_complete_report/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/misc/whatsapp 1.svg b/fleet_complete_report/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/fleet_complete_report/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/misc/whatsapp.svg b/fleet_complete_report/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/fleet_complete_report/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/modules/1.jpg b/fleet_complete_report/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..08bbafeb6 Binary files /dev/null and b/fleet_complete_report/static/description/assets/modules/1.jpg differ diff --git a/fleet_complete_report/static/description/assets/modules/2.png b/fleet_complete_report/static/description/assets/modules/2.png new file mode 100644 index 000000000..a1209a01f Binary files /dev/null and b/fleet_complete_report/static/description/assets/modules/2.png differ diff --git a/fleet_complete_report/static/description/assets/modules/3.jpg b/fleet_complete_report/static/description/assets/modules/3.jpg new file mode 100644 index 000000000..3d171226b Binary files /dev/null and b/fleet_complete_report/static/description/assets/modules/3.jpg differ diff --git a/fleet_complete_report/static/description/assets/modules/4.jpg b/fleet_complete_report/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..1f3f2e27f Binary files /dev/null and b/fleet_complete_report/static/description/assets/modules/4.jpg differ diff --git a/fleet_complete_report/static/description/assets/modules/5.jpg b/fleet_complete_report/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..0db717519 Binary files /dev/null and b/fleet_complete_report/static/description/assets/modules/5.jpg differ diff --git a/fleet_complete_report/static/description/assets/modules/6.jpg b/fleet_complete_report/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..cd62a577c Binary files /dev/null and b/fleet_complete_report/static/description/assets/modules/6.jpg differ diff --git a/fleet_complete_report/static/description/assets/screenshots/1.png b/fleet_complete_report/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..811668fb4 Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/1.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/10.png b/fleet_complete_report/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..f0338c452 Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/10.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/2.png b/fleet_complete_report/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..fa353f798 Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/2.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/3.png b/fleet_complete_report/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..210ab805a Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/3.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/4.png b/fleet_complete_report/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..26d9f5c84 Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/4.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/5.png b/fleet_complete_report/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..b953990f5 Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/5.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/6.png b/fleet_complete_report/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..2b6d5461f Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/6.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/7.png b/fleet_complete_report/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..0953c54cf Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/7.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/8.png b/fleet_complete_report/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..01e5a50aa Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/8.png differ diff --git a/fleet_complete_report/static/description/assets/screenshots/9.png b/fleet_complete_report/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..714c8e3ce Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/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..38ce1bbde 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.jpg b/fleet_complete_report/static/description/banner.jpg new file mode 100644 index 000000000..3130269c2 Binary files /dev/null and b/fleet_complete_report/static/description/banner.jpg 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..c0ba4dd74 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..a24a9d760 --- /dev/null +++ b/fleet_complete_report/static/description/index.html @@ -0,0 +1,823 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Fleet Complete Report

+

+ This module allows to generate complete PDF report for + Fleet. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

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

+
+
+
+
+
+
+ +
+
+

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

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

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

+
+
+
+
+
+
+ +
+
+

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

+
+
+
+
+
+
+ +
+
+

+ 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.

+
+
+
+
+
+
+ +
+
+

+ 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. +

+
+
+
+
+
+
+ +
+
+

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

+
+
+
+
+
+
+ +
+
+

+ 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. +

+
+
+
+
+
+
+ +
+
+

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

+
+
+
+
+
+
+ +
+
+

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

+
+
+
+
+
+
+ +
+
+

+ 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. +

+
+
+
+
+
+
+
    +
  • + Use wizard that + can be used to generate custom report. +
  • +
  • + The PDF report + that contains vehicle details, contracts, + services, odometer readings and drivers history + for the selected vehicles. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:24th January 2024 +
+

+ Initial Commit for Fleet Complete Report.

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/fleet_complete_report/wizard/__init__.py b/fleet_complete_report/wizard/__init__.py new file mode 100644 index 000000000..917c1e783 --- /dev/null +++ b/fleet_complete_report/wizard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev KP (odoo@cybrosys.com) +# +# 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..963305bea --- /dev/null +++ b/fleet_complete_report/wizard/vehicle_detail.py @@ -0,0 +1,110 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev KP (odoo@cybrosys.com) +# +# 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): + """ + Model for capturing and filtering vehicle details for report generation. + """ + _name = 'vehicle.detail' + _description = 'Vehicle Detail' + + 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_start_date(self): + """ + Onchange method triggered when the start_date field is changed. + + This method ensures that the start_date is valid based on certain + conditions. + + :return: None + """ + 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_end_date(self): + """ + Onchange method triggered when the end_date field is changed. + + This method ensures that the end_date is valid based on certain + conditions. + + :return: None + """ + 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): + """ + Onchange method triggered when the state_ids field is changed. + + This method filters the vehicle_ids based on the selected state_ids. + + :return: None + """ + 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 + + + + +