diff --git a/fleet_complete_report/README.rst b/fleet_complete_report/README.rst new file mode 100755 index 000000000..1ee7c80e7 --- /dev/null +++ b/fleet_complete_report/README.rst @@ -0,0 +1,48 @@ +.. 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 allows the users to print complete fleet report. + +Configuration +============= +* No additional configurations needed. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License, v3.0 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developers : (V17) Bhagyadev KP, + (V18) Aysha Shalin, + 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..54f8595b9 --- /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: Aysha Shalin (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..6665d16bd --- /dev/null +++ b/fleet_complete_report/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Aysha Shalin (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': '18.0.1.0.0', + 'category': 'Human Resources', + 'summary': 'This module allow to print complete fleet report.', + 'description': """This module allows to print complete fleet report, Which + includes vehicle and 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.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..6e3e78154 --- /dev/null +++ b/fleet_complete_report/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 07.09.2024 +#### Version 18.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..338d5d1a0 --- /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: Aysha Shalin (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..8b89c0890 --- /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: Aysha Shalin (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): + """ + Overrides 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..5c9a42e68 --- /dev/null +++ b/fleet_complete_report/report/vehicle_detail_report_templates.xml @@ -0,0 +1,313 @@ + + + + + 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/cybro-icon.png b/fleet_complete_report/static/description/assets/cybro-icon.png new file mode 100644 index 000000000..06e73e11d Binary files /dev/null and b/fleet_complete_report/static/description/assets/cybro-icon.png differ diff --git a/fleet_complete_report/static/description/assets/cybro-odoo.png b/fleet_complete_report/static/description/assets/cybro-odoo.png new file mode 100644 index 000000000..ed02e07a4 Binary files /dev/null and b/fleet_complete_report/static/description/assets/cybro-odoo.png differ diff --git a/fleet_complete_report/static/description/assets/h2.png b/fleet_complete_report/static/description/assets/h2.png new file mode 100644 index 000000000..0bfc4707d Binary files /dev/null and b/fleet_complete_report/static/description/assets/h2.png differ diff --git a/fleet_complete_report/static/description/assets/icons/arrows-repeat.svg b/fleet_complete_report/static/description/assets/icons/arrows-repeat.svg new file mode 100644 index 000000000..1d7efabc5 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/arrows-repeat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/icons/banner-1.png b/fleet_complete_report/static/description/assets/icons/banner-1.png new file mode 100644 index 000000000..c180db172 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/banner-1.png differ diff --git a/fleet_complete_report/static/description/assets/icons/banner-2.svg b/fleet_complete_report/static/description/assets/icons/banner-2.svg new file mode 100644 index 000000000..e606d97d9 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/banner-2.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/icons/banner-bg.png b/fleet_complete_report/static/description/assets/icons/banner-bg.png new file mode 100644 index 000000000..a8238d3c0 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/banner-bg.png differ diff --git a/fleet_complete_report/static/description/assets/icons/banner-bg.svg b/fleet_complete_report/static/description/assets/icons/banner-bg.svg new file mode 100644 index 000000000..b1378103e --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/banner-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/icons/banner-call.svg b/fleet_complete_report/static/description/assets/icons/banner-call.svg new file mode 100644 index 000000000..96c687e81 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/banner-call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/fleet_complete_report/static/description/assets/icons/banner-mail.svg b/fleet_complete_report/static/description/assets/icons/banner-mail.svg new file mode 100644 index 000000000..cbf0d158d --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/banner-mail.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/fleet_complete_report/static/description/assets/icons/banner-pattern.svg b/fleet_complete_report/static/description/assets/icons/banner-pattern.svg new file mode 100644 index 000000000..9c1c7e101 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/banner-pattern.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/icons/banner-promo.svg b/fleet_complete_report/static/description/assets/icons/banner-promo.svg new file mode 100644 index 000000000..d52791b11 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/banner-promo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/icons/brand-pair.svg b/fleet_complete_report/static/description/assets/icons/brand-pair.svg new file mode 100644 index 000000000..d8db7fc1e --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/brand-pair.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/close-icon.svg b/fleet_complete_report/static/description/assets/icons/close-icon.svg new file mode 100644 index 000000000..df8cce37a --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/close-icon.svg @@ -0,0 +1,5 @@ + + + + + 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/collabarate-icon.svg b/fleet_complete_report/static/description/assets/icons/collabarate-icon.svg new file mode 100644 index 000000000..dd4e10518 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/collabarate-icon.svg @@ -0,0 +1,3 @@ + + + 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/cybro-logo.png b/fleet_complete_report/static/description/assets/icons/cybro-logo.png new file mode 100644 index 000000000..ff4b78220 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/cybro-logo.png differ diff --git a/fleet_complete_report/static/description/assets/icons/down.svg b/fleet_complete_report/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file 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/faq.png b/fleet_complete_report/static/description/assets/icons/faq.png new file mode 100644 index 000000000..4250b5b81 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/faq.png differ diff --git a/fleet_complete_report/static/description/assets/icons/feature-icon.svg b/fleet_complete_report/static/description/assets/icons/feature-icon.svg new file mode 100644 index 000000000..fa0ea6850 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/feature-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/icons/feature.png b/fleet_complete_report/static/description/assets/icons/feature.png new file mode 100644 index 000000000..ac7a785c0 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/feature.png differ diff --git a/fleet_complete_report/static/description/assets/icons/gear.svg b/fleet_complete_report/static/description/assets/icons/gear.svg new file mode 100644 index 000000000..0cc66b6ea --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/gear.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/icons/hero.gif b/fleet_complete_report/static/description/assets/icons/hero.gif new file mode 100644 index 000000000..380654dfe Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/hero.gif differ diff --git a/fleet_complete_report/static/description/assets/icons/hire-odoo.svg b/fleet_complete_report/static/description/assets/icons/hire-odoo.svg new file mode 100644 index 000000000..e1ac089b0 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/hire-odoo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + 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/life-ring-icon.svg b/fleet_complete_report/static/description/assets/icons/life-ring-icon.svg new file mode 100644 index 000000000..3ae6e1d89 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/life-ring-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + 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/mail.svg b/fleet_complete_report/static/description/assets/icons/mail.svg new file mode 100644 index 000000000..1eedde695 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + 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/notes.png b/fleet_complete_report/static/description/assets/icons/notes.png new file mode 100644 index 000000000..ee5e95404 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/notes.png differ diff --git a/fleet_complete_report/static/description/assets/icons/notification icon.svg b/fleet_complete_report/static/description/assets/icons/notification icon.svg new file mode 100644 index 000000000..053189973 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/notification icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/icons/odoo-consultancy.svg b/fleet_complete_report/static/description/assets/icons/odoo-consultancy.svg new file mode 100644 index 000000000..e05f65bde --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/odoo-consultancy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/fleet_complete_report/static/description/assets/icons/odoo-licencing.svg b/fleet_complete_report/static/description/assets/icons/odoo-licencing.svg new file mode 100644 index 000000000..2606c88b0 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/odoo-licencing.svg @@ -0,0 +1,3 @@ + + + diff --git a/fleet_complete_report/static/description/assets/icons/odoo-logo.png b/fleet_complete_report/static/description/assets/icons/odoo-logo.png new file mode 100644 index 000000000..0e4d0eb5a Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/odoo-logo.png differ diff --git a/fleet_complete_report/static/description/assets/icons/patter.svg b/fleet_complete_report/static/description/assets/icons/patter.svg new file mode 100644 index 000000000..25c9c0a8f --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/patter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/icons/pattern1.png b/fleet_complete_report/static/description/assets/icons/pattern1.png new file mode 100644 index 000000000..09ab0fb2d Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/pattern1.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-piece-icon.svg b/fleet_complete_report/static/description/assets/icons/puzzle-piece-icon.svg new file mode 100644 index 000000000..3e9ad9373 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/puzzle-piece-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + 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/replace-icon.svg b/fleet_complete_report/static/description/assets/icons/replace-icon.svg new file mode 100644 index 000000000..d0e3a7af1 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/replace-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + 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/screenshot-main.png b/fleet_complete_report/static/description/assets/icons/screenshot-main.png new file mode 100644 index 000000000..575f8e676 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/screenshot-main.png differ diff --git a/fleet_complete_report/static/description/assets/icons/screenshot.png b/fleet_complete_report/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..cef272529 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/screenshot.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/skype-fill.svg b/fleet_complete_report/static/description/assets/icons/skype-fill.svg new file mode 100644 index 000000000..c17423639 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/skype-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/icons/skype.png b/fleet_complete_report/static/description/assets/icons/skype.png new file mode 100644 index 000000000..51b409fb3 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/skype.png differ diff --git a/fleet_complete_report/static/description/assets/icons/skype.svg b/fleet_complete_report/static/description/assets/icons/skype.svg new file mode 100644 index 000000000..df3dad39b --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/skype.svg @@ -0,0 +1,3 @@ + + + diff --git a/fleet_complete_report/static/description/assets/icons/star-1.svg b/fleet_complete_report/static/description/assets/icons/star-1.svg new file mode 100644 index 000000000..7e55ab162 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/icons/star-2.svg b/fleet_complete_report/static/description/assets/icons/star-2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/fleet_complete_report/static/description/assets/icons/support.png b/fleet_complete_report/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/support.png differ diff --git a/fleet_complete_report/static/description/assets/icons/test-1 - Copy.png b/fleet_complete_report/static/description/assets/icons/test-1 - Copy.png new file mode 100644 index 000000000..f6a902663 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/test-1 - Copy.png differ diff --git a/fleet_complete_report/static/description/assets/icons/test-1.png b/fleet_complete_report/static/description/assets/icons/test-1.png new file mode 100644 index 000000000..0908add2b Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/test-1.png differ diff --git a/fleet_complete_report/static/description/assets/icons/test-2.png b/fleet_complete_report/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..4671fe91e Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/test-2.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/translate.svg b/fleet_complete_report/static/description/assets/icons/translate.svg new file mode 100644 index 000000000..af9c8a1aa --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/translate.svg @@ -0,0 +1,10 @@ + + + + + + + + + + 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/video.png b/fleet_complete_report/static/description/assets/icons/video.png new file mode 100644 index 000000000..576705b17 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/video.png differ diff --git a/fleet_complete_report/static/description/assets/icons/whatsapp.png b/fleet_complete_report/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/fleet_complete_report/static/description/assets/icons/whatsapp.png differ diff --git a/fleet_complete_report/static/description/assets/icons/wrench-icon.svg b/fleet_complete_report/static/description/assets/icons/wrench-icon.svg new file mode 100644 index 000000000..174b5a465 --- /dev/null +++ b/fleet_complete_report/static/description/assets/icons/wrench-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + 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/modules/1.png b/fleet_complete_report/static/description/assets/modules/1.png new file mode 100644 index 000000000..893c46ae5 Binary files /dev/null and b/fleet_complete_report/static/description/assets/modules/1.png differ diff --git a/fleet_complete_report/static/description/assets/modules/2.jpg b/fleet_complete_report/static/description/assets/modules/2.jpg new file mode 100644 index 000000000..75adcdff5 Binary files /dev/null and b/fleet_complete_report/static/description/assets/modules/2.jpg 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..d70c661c5 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/5.png b/fleet_complete_report/static/description/assets/modules/5.png new file mode 100644 index 000000000..48e801c6a Binary files /dev/null and b/fleet_complete_report/static/description/assets/modules/5.png differ diff --git a/fleet_complete_report/static/description/assets/modules/6.png b/fleet_complete_report/static/description/assets/modules/6.png new file mode 100644 index 000000000..817ba4bb3 Binary files /dev/null and b/fleet_complete_report/static/description/assets/modules/6.png differ diff --git a/fleet_complete_report/static/description/assets/modules/reminder.jpg b/fleet_complete_report/static/description/assets/modules/reminder.jpg new file mode 100644 index 000000000..cba1544b3 Binary files /dev/null and b/fleet_complete_report/static/description/assets/modules/reminder.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..e09b36c78 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..037293161 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/hero.gif b/fleet_complete_report/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..230e4d31e Binary files /dev/null and b/fleet_complete_report/static/description/assets/screenshots/hero.gif differ diff --git a/fleet_complete_report/static/description/assets/y18.jpg b/fleet_complete_report/static/description/assets/y18.jpg new file mode 100644 index 000000000..eea1714f2 Binary files /dev/null and b/fleet_complete_report/static/description/assets/y18.jpg 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..44e34b2ad 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..b05ebb6cc 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..9fb5076a6 --- /dev/null +++ b/fleet_complete_report/static/description/index.html @@ -0,0 +1,1210 @@ + + + + + + Fleet Complete Report + + + + + + + + + + +
+
+ + + +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+
+

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

+

Fleet Complete Report +

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

Key + Highlights

+
+
+
+
+ +
+
+ Wizard for Generating Report. +
+
+
+
+
+
+ +
+
+ Fleet Report. +
+

+ Fleet report consists Vehicle Details, + Contracts, Services, Odometer Readings and + Drivers History for the selected vehicles. +

+
+
+
+
+ +
+
+
+ Fleet Complete Report +

+ Are you ready to make your business more + organized? +
Improve now! +

+ +
+
+ +
+
+
+ + + + +
+
+ +
+
+
+
+ acc_bg +
+ +
+
+
+
+

+ Configure + + Menu +

+
+
+

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

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

+ Vehicle Details + + Menu. +

+
+
+

+ Navigate to Fleet -> Reporting -> Vehicle Details. +

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

+ Report Generation + + Wizard. +

+
+
+

+ Add the Filters and print the Report. Disable + the Exclude Vehicle Data checkbox to display the + vehicle data in the report. +

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

+ Fleet + + + Report. +

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

+ Details of + + + Contracts. +

+
+
+

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

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

+ Details of + + + Services. +

+
+
+

+ All the service records of the listed vehicles + within the selected period, grouped by vehicle, + showing the total service cost per vehicle as + well as the overall total. +

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

+ Odometer + + Readings. +

+
+
+

+ 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' will hide the + vehicle data from the report.

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

+ Print Complete Fleet Report.

+
+
+
+
+
+
+
+ +
+

+ Fleet Report Consists Vehicle Details, Contracts, + Services, Odometer Readings and Drivers History + for the Selected Vehicles.

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

+ While configuring a + backup, selecting + the Zip option will + include the + filestore in the + backup, while + choosing the Dump + option will create a + backup without the + filestore. +

+
+
+ +
+ +
+

+ Enable the "Remove + Old Backups" option + in the backup + creation view to + automatically delete + previous backups + based on the number + of days specified. +

+
+
+ +
+ +
+

+ Enable the "Notify + User" option and + specify a contact to + receive an email + containing a + detailed report with + the failure reason + and backup details. + This option will + also send an email + upon successful + backup. +

+
+
+ +
+ +
+

+ Select the backup + destination as local + storage and specify + a backup path to a + location on the + system to create + backups on your own + system. +

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

+ Latest Release 18.0.1.0.0 +

+ + 20th October, 2024 + +
+
+
+
+
+ Add +
+
+
+
    +
  • + Initial Commit +
  • + +
+
+
+
+
+
+
+
+
+
+ + + + + + +
+

+ Our Services

+ +
+ +
+
+ .... +
+
+ +
+ + +
+
+ + + + + + diff --git a/fleet_complete_report/wizard/__init__.py b/fleet_complete_report/wizard/__init__.py new file mode 100644 index 000000000..4e4a07323 --- /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: Aysha Shalin (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..85f5b9feb --- /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: Aysha Shalin (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 + + + + +