diff --git a/advanced_fleet_rental/README.rst b/advanced_fleet_rental/README.rst new file mode 100644 index 000000000..766d187b6 --- /dev/null +++ b/advanced_fleet_rental/README.rst @@ -0,0 +1,42 @@ +.. image:: https://img.shields.io/badge/license-OPL--1-red.svg + :target: https://www.odoo.com/documentation/17.0/legal/licenses.html#odoo-apps + :alt: License: OPL-1 + +Advanced Fleet Rental Management +========================== +Advanced Fleet Rental Management system is designed to streamline the process of managing a fleet of vehicles for rental businesses + +License +------- +Odoo Proprietary License v1.0. +(https://www.odoo.com/documentation/17.0/legal/licenses.html#odoo-apps) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V17)Anfas Faisal K, 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 https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ \ No newline at end of file diff --git a/advanced_fleet_rental/__init__.py b/advanced_fleet_rental/__init__.py new file mode 100644 index 000000000..9e26213eb --- /dev/null +++ b/advanced_fleet_rental/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Anfas Faisal K (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from . import models +from . import wizard diff --git a/advanced_fleet_rental/__manifest__.py b/advanced_fleet_rental/__manifest__.py new file mode 100644 index 000000000..894b82a8f --- /dev/null +++ b/advanced_fleet_rental/__manifest__.py @@ -0,0 +1,71 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Anfas Faisal K (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +{ + 'name': 'Advanced Fleet Rental Management', + 'version': '17.0.1.0.0', + 'category': "Extra Tools", + 'summary': """This module will helps you to give the vehicles for Rent.""", + 'description': "This module enhances Odoo’s fleet management " + "functionality for vehicle rentals, including cars, " + "vans, bikes, and jeeps. Key features include:" + "Detailed rental contracts and invoicing." + "Management of daily, hourly, and kilometer-based rental terms." + "Integration with Odoo’s accounting module for automated invoicing and payments." + "Tracking of vehicle status, maintenance, and extra service charges." + "A user-friendly dashboard for monitoring fleet performance and rental contracts.", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['fleet', 'mail', 'sale_management', 'account', ], + 'data': [ + 'security/ir.model.access.csv', + 'data/ir_cron_data.xml', + 'data/product_product_data.xml', + 'data/ir_sequence_data.xml', + 'views/fleet_vehicle_views.xml', + 'views/fleet_dashboard.xml', + 'views/multi_image_views.xml', + 'views/fleet_rental_contract_views.xml', + 'report/fleet_rental_contract_report.xml', + 'report/fleet_rental_contract_template.xml', + 'views/res_partner_views.xml', + 'views/account_move_views.xml', + 'views/rental_payment_plan_views.xml', + 'views/cancellation_policy_views.xml', + 'views/fleet_dashboard.xml', + 'wizard/damage_invoice_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'advanced_fleet_rental/static/src/js/fleet_dashboard.js', + 'advanced_fleet_rental/static/src/xml/fleet_dashboard.xml', + 'advanced_fleet_rental/static/src/css/xero_dashboard.css', + 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.0/chart.umd.min.js', + ] + }, + 'images': ['static/description/banner.jpg'], + 'license': 'OPL-1', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/advanced_fleet_rental/data/ir_cron_data.xml b/advanced_fleet_rental/data/ir_cron_data.xml new file mode 100644 index 000000000..1c309c315 --- /dev/null +++ b/advanced_fleet_rental/data/ir_cron_data.xml @@ -0,0 +1,16 @@ + + + + + + Fleet : Automatic Invoice Creation + + code + model._schedule_auto_invoice_checker() + 1 + days + -1 + False + + + diff --git a/advanced_fleet_rental/data/ir_sequence_data.xml b/advanced_fleet_rental/data/ir_sequence_data.xml new file mode 100644 index 000000000..e5bc20370 --- /dev/null +++ b/advanced_fleet_rental/data/ir_sequence_data.xml @@ -0,0 +1,11 @@ + + + + + Vehicle Rental Code + vehicle.sequence + VC/%(year)s/%(month)s/%(day)s/ + 5 + 1 + + \ No newline at end of file diff --git a/advanced_fleet_rental/data/product_product_data.xml b/advanced_fleet_rental/data/product_product_data.xml new file mode 100644 index 000000000..f36110e4e --- /dev/null +++ b/advanced_fleet_rental/data/product_product_data.xml @@ -0,0 +1,49 @@ + + + + + + Vehicle Rent Charge + VRC + Lets you charge a fixed rate for Vehicle Rental. + service + + + 0.0 + order + + + + Extra Charges + EC + Fixed rate for Extra Charges. + service + + + 0.0 + order + + + + Damage Charge + DC + Fixed rate for Damage Charges. + service + + + 0.0 + order + + + + Cancellation Charge + CC + Fixed rate for Cancellation Charges. + service + + + 0.0 + order + + + \ No newline at end of file diff --git a/advanced_fleet_rental/doc/RELEASE_NOTES.md b/advanced_fleet_rental/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..cf8b40854 --- /dev/null +++ b/advanced_fleet_rental/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 07.04.2025 +#### Version 17.0.1.0.0 +#### ADD + +- Initial commit for Advanced Fleet Rental Management \ No newline at end of file diff --git a/advanced_fleet_rental/models/__init__.py b/advanced_fleet_rental/models/__init__.py new file mode 100644 index 000000000..8f82e52e1 --- /dev/null +++ b/advanced_fleet_rental/models/__init__.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Anfas Faisal K (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from . import account_move +from . import cancellation_policy +from . import extra_service +from . import fleet_dashboard +from . import fleet_rental_contract +from . import fleet_vehicle +from . import insurance_policy +from . import multi_image +from . import rental_payment_plan + diff --git a/advanced_fleet_rental/models/account_move.py b/advanced_fleet_rental/models/account_move.py new file mode 100644 index 000000000..5ac672fa1 --- /dev/null +++ b/advanced_fleet_rental/models/account_move.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Anfas Faisal K (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from odoo import fields, models + + +class AccountMove(models.Model): + """ + Inherits the 'account.move' model to add a relationship with the + 'fleet.rental.contract' model. This allows linking a vehicle rental + contract to an accounting move. + """ + _inherit = "account.move" + + vehicle_rental_id = fields.Many2one('fleet.rental.contract', + string="Vehicle Contract", + readonly=True) + + + diff --git a/advanced_fleet_rental/models/cancellation_policy.py b/advanced_fleet_rental/models/cancellation_policy.py new file mode 100644 index 000000000..be8789267 --- /dev/null +++ b/advanced_fleet_rental/models/cancellation_policy.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Anfas Faisal K (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from odoo import fields, models + + +class CancellationPolicy(models.Model): + """ + Model for defining a cancellation policy, including the policy name, + creation date, and detailed terms and conditions. + """ + _name = 'cancellation.policy' + _description = 'Cancellation Policy' + + name = fields.Char(string='Policy Name', required=True, + help='Name of the cancellation policy.') + terms_conditions = fields.Text(string='Terms & Conditions', + help='Detailed terms and conditions ' + 'of the cancellation policy.') diff --git a/advanced_fleet_rental/models/extra_service.py b/advanced_fleet_rental/models/extra_service.py new file mode 100644 index 000000000..5272eb125 --- /dev/null +++ b/advanced_fleet_rental/models/extra_service.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Anfas Faisal K (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from odoo import api, fields, models + + +class ExtraService(models.Model): + """ + Model for defining extra services that can be added to a fleet rental + contract Each service is associated with a product, and the total amount + is computed based on the quantity and unit price of the product. + """ + _name = 'extra.service' + _description = 'Extra Services' + + product_id = fields.Many2one('product.product', + string='Product', + required=True, + help='Description of the extra service.') + quantity = fields.Float(string='Quantity', default=1.0, + required=True, + help='Quantity of the extra service.') + unit_price = fields.Float(string='Unit Price', + related='product_id.lst_price', store=True, + readonly=False, + help='Unit price of the extra service.') + amount = fields.Float(string='Amount', compute='_compute_amount', + store=True, + help='Total amount for the extra service.') + description = fields.Char(string='Description', + help='Description of the Product') + contract_id = fields.Many2one('fleet.rental.contract', + string='Contract Rent', + help='Reference to the vehicle rent.') + + @api.depends('quantity', 'unit_price') + def _compute_amount(self): + """ + Compute the total amount for the extra service based on the + quantity and unit price. The amount is calculated as + quantity * unit_price and stored in the 'amount' field. + """ + for service in self: + service.amount = service.quantity * service.unit_price + + + + diff --git a/advanced_fleet_rental/models/fleet_dashboard.py b/advanced_fleet_rental/models/fleet_dashboard.py new file mode 100644 index 000000000..e538db74f --- /dev/null +++ b/advanced_fleet_rental/models/fleet_dashboard.py @@ -0,0 +1,102 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Anfas Faisal K (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from odoo import api, models +from datetime import datetime, timedelta + + +class FleetDashboard(models.Model): + """ + Model for the Fleet Dashboard, providing various statistics and data + related to the fleet vehicles, contracts, and invoices. + """ + _name = 'fleet.dashboard' + _description = 'Fleet Dashboard' + + @api.model + def get_datas(self): + """ + Retrieves overall statistics related to fleet vehicles, contracts, + and invoices. + """ + total_vehicles = self.env['fleet.vehicle'].search_count([]) + operational_vehicles = self.env['fleet.vehicle'].search_count( + [('status', '=', 'operational')]) + maintenance_vehicles = self.env['fleet.vehicle'].search_count( + [('status', '=', 'undermaintenance')]) + all_invoices = self.env['account.move'].search_count( + [('vehicle_rental_id', '!=', False)]) + pending_invoices = self.env['account.move'].search_count([ + ('vehicle_rental_id', '!=', False), + ('state', '=', 'posted'), + ('payment_state', '!=', 'paid') + ]) + total_contracts = self.env['fleet.rental.contract'].search_count([]) + total_contract_working = self.env[ + 'fleet.rental.contract'].search_count( + [('state', '=', 'in_progress')]) + total_contract_returned = self.env[ + 'fleet.rental.contract'].search_count( + [('state', '=', 'return')]) + total_contract_cancel = self.env['fleet.rental.contract'].search_count( + [('state', '=', 'cancel')]) + + return { + 'total_vehicles': total_vehicles, + 'total_contracts': total_contracts, + 'total_contract_working': total_contract_working, + 'total_contract_return': total_contract_returned, + 'total_contract_cancel': total_contract_cancel, + 'operational': operational_vehicles, + 'under_maintenance': maintenance_vehicles, + 'all_customers': self.env['res.partner'].search_count([]), + 'all_invoices': all_invoices, + 'pending_invoices': pending_invoices, + } + + @api.model + def get_monthly_contract_invoices(self): + """ + Retrieves the count of posted invoices for each month of the + current year related to vehicle rentals. + """ + current_year = datetime.now().year + data = [] + labels = ['January', 'February', 'March', 'April', 'May', 'June', + 'July', 'August', 'September', 'October', 'November', + 'December'] + + for month in range(1, 13): + start_date = datetime(current_year, month, 1) + end_date = (start_date + timedelta(days=32)).replace( + day=1) - timedelta(days=1) + + invoice_count = self.env['account.move'].search_count([ + ('vehicle_rental_id', '!=', False), + ('invoice_date', '>=', start_date), + ('invoice_date', '<=', end_date), + ('state', '=', 'posted') + ]) + data.append(invoice_count) + return { + 'labels': labels, + 'data': data + } diff --git a/advanced_fleet_rental/models/fleet_rental_contract.py b/advanced_fleet_rental/models/fleet_rental_contract.py new file mode 100644 index 000000000..dff7e2c53 --- /dev/null +++ b/advanced_fleet_rental/models/fleet_rental_contract.py @@ -0,0 +1,677 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Anfas Faisal K (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from datetime import date +from odoo import api, fields, models, _ +from dateutil.relativedelta import relativedelta +from odoo.exceptions import ValidationError + + +class FleetRentalContract(models.Model): + """ + Represents a car rental contract, including details about the customer, + vehicle, rental period, charges, and various related information. + """ + _name = 'fleet.rental.contract' + _description = 'Fleet Rental Contract' + _inherit = ['mail.thread', 'mail.activity.mixin'] + + name = fields.Char(string="Sequence", + default=lambda self: _('New'), + copy=False, readonly=True, tracking=True, + help='Unique contract number for the rental agreement.') + + state = fields.Selection( + [('new', 'New'), + ('in_progress', 'In Progress'), + ('return', 'Return'), ('cancel', 'Cancel')], + string='State', default='new', + help='Contract Progress', + group_expand='_group_expand_states',tracking=True) + customer_id = fields.Many2one( + 'res.partner', string='Customer', + help='The customer who is renting the vehicle.', + required=True, tracking=True) + email = fields.Char(string='Email', + related='customer_id.email', + help='Email address of the customer.', + readonly=False) + phone = fields.Char('Phone', related='customer_id.phone', + help="Phone Number of the customer") + pickup_date = fields.Datetime( + string='Pick-up Date', + help='Date and time when the vehicle will be picked up.', + required=True, tracking=True) + dropoff_date = fields.Datetime( + string='Drop-off Date', + help='Date and time when the vehicle will be returned.', + required=True, tracking=True) + pickup_location = fields.Char( + string='Pick-Up Location', + help='Location where the vehicle will be picked up.', + required=True) + dropoff_location = fields.Char( + string='Drop-Off Location', + help='Location where the vehicle will be dropped off.', + required=True) + pickup_street = fields.Char( + string='Pick-Up Street', + help='Street address for the pick-up location.', + required=True) + dropoff_street = fields.Char( + string='Drop-Off Street', + help='Street address for the drop-off location.', + required=True) + pickup_city = fields.Char( + string='Pick-Up City', + help='City where the vehicle will be picked up.', + required=True) + dropoff_city = fields.Char( + string='Drop-Off City', + help='City where the vehicle will be dropped off.', + required=True) + pickup_state_id = fields.Many2one( + 'res.country.state', + string='Pick-Up State', + help='State where the vehicle will be picked up.', + required=True) + dropoff_state_id = fields.Many2one( + 'res.country.state', + string='Drop-Off State', + help='State where the vehicle will be dropped off.', + required=True) + pickup_zip = fields.Char( + string='Pick-Up ZIP', + help='ZIP code for the pick-up location.', + required=True) + dropoff_zip = fields.Char(string='Drop-Off ZIP', + help='ZIP code for the drop-off location.') + pickup_country_id = fields.Many2one( + 'res.country', + string='Pick-Up Country', + help='Country where the vehicle will be picked up.', + required=True) + dropoff_country_id = fields.Many2one( + 'res.country', + string='Drop-Off Country', + help='Country where the vehicle will be dropped off.', + required=True) + vehicle_id = fields.Many2one( + 'fleet.vehicle', string='Vehicle', + help='The vehicle being rented.', + required=True) + model = fields.Char(related='vehicle_id.model_id.name', string='Model', + help='Model of the rented vehicle.') + transmission = fields.Selection( + [('automatic', 'Automatic'), ('manual', 'Manual')], + string='Transmission', related='vehicle_id.transmission', + help='Transmission type of the rented vehicle.') + fuel_type = fields.Selection( + [ + ('diesel', 'Diesel'), + ('gasoline', 'Gasoline'), + ('full_hybrid', 'Full Hybrid'), + ('plug_in_hybrid_diesel', 'Plug-in Hybrid Diesel'), + ('plug_in_hybrid_gasoline', 'Plug-in Hybrid Gasoline'), + ('cng', 'CNG'), + ('lpg', 'LPG'), + ('hydrogen', 'Hydrogen'), + ('electric', 'Electric'), + ], string='Fuel Type', related='vehicle_id.fuel_type', + help='Fuel type of the rented vehicle.') + last_odometer = fields.Float( + string='Last Odometer', + related='vehicle_id.odometer', + help='Last recorded odometer reading of the vehicle.') + odometer_unit = fields.Selection( + [('kilometers', 'km'), ('miles', 'mi')], + string='Odometer Unit', default='kilometers', + related='vehicle_id.odometer_unit', + help='Unit of measurement for the odometer reading.') + + driver_required = fields.Boolean( + string='Driver Required', + help='Indicates if a driver is required for the rental.') + driver_id = fields.Many2one( + 'res.partner', string='Driver', + help='Driver assigned to the rental if required.') + charge_type = fields.Selection( + [('excluding', 'Excluding in rent charge'), + ('including', 'Including in rent charge')], + string='Charge Type', + help='Specifies if the driver charge is included in the rental ' + 'charge or not.') + driver_charge = fields.Float( + string='Driver Charge', + help='Charge for the driver if not included ' + 'in the rental charge.') + + # Rent Details + rent_type = fields.Selection( + [('hours', 'Hours'), ('days', 'Days'), + ('kilometers', 'Kilometers')], + string='Rent Type', + default='hours', + help='Type of rent calculation (per day, per kilometer, or per mile).') + rent_per_hour = fields.Float(string='Rent / Hour', + help='Rental charge per hour.', + related='vehicle_id.rent_hour') + total_hours = fields.Float(string='Total Hours ', + help="Total Hours Taken for Rent", + compute='_compute_rental_period', store=True, + readonly=False) + rent_per_day = fields.Float(string='Rent / Day', + help='Rental charge per day.', + related='vehicle_id.rent_day') + total_days = fields.Integer(string='Total Days', + help='Total number of rental days.', + compute='_compute_rental_period', store=True, + readonly=False) + rent_per_km = fields.Float(string='Rent / KM', + help='Rental charge per km.' + , related='vehicle_id.rent_kilometer') + total_km = fields.Integer(string='Total KM', + help='Total Kilometers.') + total_rental_charge = fields.Float( + string='Total Rental Charge', + compute='_compute_total_rental_charge', store=True, + help='Total rental charge for the contract.') + + payment_type = fields.Selection( + [('daily', 'Daily'), ('weekly', 'Weekly'), + ('monthly', 'Monthly'), + ('full', 'Fully')], + string='Payment Type', + help='Payment schedule for the rental charge.', + default='full') + invoice_item_id = fields.Many2one( + 'product.product', + string='Invoice Item', + help='Description of the item to be invoiced.', + default=lambda self: self.env.ref( + 'advanced_fleet_rental.product_product_vehicle_rental_charge')) + is_extra_charge = fields.Boolean(string='Is any extra charge', + help='Indicates if there are any extra ' + 'charges applicable.') + extra_per_hour = fields.Float(string='Extra Charges / Hour', + help='Rental charge per hour.', + related='vehicle_id.charge_hour') + total_extra_hours = fields.Integer(string='Total Extra Hours', + help='Total number of rental hours.') + extra_per_day = fields.Float(string='Extra Charges / Day', + help='Rental charge per hour.', + related='vehicle_id.charge_day') + total_extra_days = fields.Integer(string='Total Extra Days', + help='Total number of rental days.') + extra_per_km = fields.Float(string='Extra Charges / KM', + help='Rental charge per hour.', + related='vehicle_id.charge_kilometer') + + total_extra_km = fields.Float(string='Total Extra K/M', + help="Total Extra K/M taken") + total_extra_charge = fields.Float(string="Total Extra Charge", + help="Extra Charges per K/M", + compute='_compute_total_extra_charge' + , store=True) + + rental_payment_plan_ids = (fields.One2many + ('rental.payment.plan', + 'contract_id', + string="Vehicle Payment Details", + help="Details of the paymentplans for the" + " vehicle rental.")) + extra_service_ids = (fields.One2many + ('extra.service', + 'contract_id', + string="Extra Services", + help="List of extra services associated with this" + "vehicle rental." + )) + is_extra_invoice_created = fields.Boolean( + string='Extra Invoice Created', + help="Indicates whether an extra invoice has been created for the" + " extra services.") + image_ids = fields.One2many( + 'multi.image', + 'contract_id', + string="Images of the Vehicle", + help="Images related to the Vehicles of vehicle rental." + ) + insurance_ids = fields.One2many( + 'insurance.policy', + 'contract_id', + string="Insurance Policy", + help="Insurance policies associated with the vehicle rental.") + + vehicle_to_invoice_count = fields.Integer( + string='Number of vehicle rent to invoice', + compute='_compute_vehicle_to_invoice', + readonly=True, + help="Number of vehicle rental invoices that is created." + ) + is_damaged_invoiced = fields.Boolean( + string='Damage Invoice Created', + help="Indicates whether an extra invoice has been created for the" + " extra services.") + cancellation_policy_id = fields.Many2one( + 'cancellation.policy', string='Cancellation Policy', + help='Select the cancellation policy applicable for this record. ' + 'The cancellation charges will be calculated based on the ' + 'selected policy.') + cancellation_charge = fields.Float(string='Cancellation Charge') + + cancellation_terms = fields.Text( + string='Cancellation Terms and Conditions', + related="cancellation_policy_id.terms_conditions", + readonly=False) + is_cancelled_invoiced = fields.Boolean( + string='Cancelled Invoice Created', + help="Indicates whether an cancelled invoice has been created for the" + "Cancellation Policy.") + digital_sign = fields.Binary(string='Signature', help="Binary field to " + "store digital " + "signatures.") + sign_date = fields.Datetime( + string='Sign Date', + help='Date and time of the signature signed.') + currency_id = fields.Many2one( + 'res.currency', 'Currency', + default=lambda self: self.env.user.company_id.currency_id.id, + help="if you select this currency bidding will be on that currency " + "itself") + damage_description = fields.Text(string="Damage Description") + damage_amount = fields.Float(string="Damage Amount", + help="Total Amount for the damages") + # Responsible + responsible_id = fields.Many2one( + 'res.users', string='Responsible', + help='User responsible for managing the rental contract.', + required=True, tracking=True) + + @api.onchange('pickup_state_id') + def _onchange_pickup_state(self): + """ + Automatically updates the 'Pick-Up Country' field based on the selected 'Pick-Up State'. + + When a user selects a state for vehicle pick-up, this method fetches the corresponding + country from the selected state and sets it in the 'Pick-Up Country' field. + """ + if self.pickup_state_id: + self.pickup_country_id = self.pickup_state_id.country_id + + @api.onchange('dropoff_state_id') + def _onchange_dropoff_state(self): + """ + Automatically updates the 'Drop-Off Country' field based on the selected 'Drop-Off State'. + + When a user selects a state for vehicle drop-off, this method fetches the corresponding + country from the selected state and sets it in the 'Drop-Off Country' field. + """ + if self.dropoff_state_id: + self.dropoff_country_id = self.dropoff_state_id.country_id + + def _group_expand_states(self, states, domain, order): + """ + Expands the available group states for selection. + """ + return ['new', 'in_progress', 'return', 'cancel'] + + @api.model + def create(self, vals_list): + """ + Override the create method to set a default sequence number if not + provided. + """ + if vals_list.get('name', 'New') == 'New': + vals_list['name'] = self.env['ir.sequence'].next_by_code( + 'vehicle.sequence') or 'New' + return super().create(vals_list) + + @api.depends('extra_per_hour', 'total_extra_hours', 'extra_per_day', + 'total_extra_days', 'extra_per_km', 'total_extra_km') + def _compute_total_extra_charge(self): + """ + Compute the total extra charge based on the rent type and extra usage + (hours, days, kilometers). + """ + for record in self: + if record.rent_type == 'hours': + record.total_extra_charge = (record.extra_per_hour * + record.total_extra_hours) + elif record.rent_type == 'days': + record.total_extra_charge = (record.extra_per_day * + record.total_extra_days) + elif record.rent_type == 'kilometers': + record.total_extra_charge = ( + record.extra_per_km * record.total_extra_km) + else: + record.total_extra_charge = 0 + + @api.depends( + 'rent_type', + 'rent_per_hour', 'total_hours', + 'rent_per_day', 'total_days', + 'rent_per_km', 'total_km', + 'driver_charge', 'charge_type', + 'driver_required' + ) + def _compute_total_rental_charge(self): + """ + Compute the total rental charge based on the rent type and usage + (hours, days, kilometers). Include driver charge if applicable. + """ + for record in self: + if record.rent_type == 'hours': + record.total_rental_charge = ( + record.rent_per_hour * record.total_hours) + elif record.rent_type == 'days': + record.total_rental_charge = ( + record.rent_per_day * record.total_days) + elif record.rent_type == 'kilometers': + record.total_rental_charge = ( + record.rent_per_km * record.total_km) + else: + record.total_rental_charge = 0 + if record.charge_type == 'including' and record.driver_required: + record.total_rental_charge += record.driver_charge + + def action_create_extra_invoice(self): + """ + Create an invoice for extra charges incurred during the rental period. + """ + product_id = self.env.ref( + 'advanced_fleet_rental.product_product_vehicle_extra_rental_charge') + invoice_vals = { + 'partner_id': self.customer_id.id, + 'move_type': 'out_invoice', + 'vehicle_rental_id': self.id, + 'invoice_date': date.today(), + 'invoice_line_ids': [(0, 0, { + 'product_id': product_id.id, + 'name': product_id.name, + 'quantity': 1, + 'price_unit': self.total_extra_charge, + })], + } + invoice = self.env['account.move'].create(invoice_vals) + invoice.action_post() + + def action_installment(self): + """ + Generate the rental payment plan based on the selected payment type. + """ + self.ensure_one() + self.rental_payment_plan_ids.unlink() + if self.rent_type == 'kilometers' and self.total_km == 0: + raise ValidationError( + _('If the rent type is "kilometers", the total ' + 'kilometers cannot be 0.')) + if self.rent_type == 'hours' and self.payment_type != 'full': + raise ValidationError( + _('If the rent type is "hours", the payment type must be ' + '"full".')) + if self.rent_type == 'kilometers' and self.payment_type != 'full': + raise ValidationError( + _('If the rent type is "kilometers", the payment type must be ' + '"full".')) + if (self.rent_type == 'days' and self.payment_type == 'weekly' + and self.total_days < 7): + raise ValidationError(_( + 'The total days are less than a week. ' + 'Please select a valid payment type.')) + if (self.rent_type == 'days' and self.payment_type == 'monthly' + and self.total_days < 30): + raise ValidationError(_( + 'The total days are less than a month. ' + 'Please select a valid payment type.')) + pick_up = self.pickup_date + drop_date = self.dropoff_date + total_amount = self.total_rental_charge + + if self.payment_type == 'full': + self.env['rental.payment.plan'].create({ + 'contract_id': self.id, + 'invoice_item_id': self.invoice_item_id.id, + 'payment_date': pick_up, + 'payment_amount': total_amount, + 'payment_state': 'not_paid', + }) + return + + # Calculate interval and number of installments based on rent_type + if self.rent_type == 'hours': + amount_per_unit = self.rent_per_hour + base_interval = relativedelta(hours=1) + elif self.rent_type == 'days': + amount_per_unit = self.rent_per_day + base_interval = relativedelta(days=1) + + if self.payment_type == 'daily': + payment_interval = relativedelta(days=1) + current_date = pick_up + elif self.payment_type == 'weekly': + payment_interval = relativedelta(weeks=1) + current_date = pick_up + elif self.payment_type == 'monthly': + payment_interval = relativedelta(months=1) + current_date = pick_up + payment_interval + else: + payment_interval = base_interval + while current_date < drop_date: + next_date = min(current_date + payment_interval, drop_date) + + # Calculate units in this payment period + if self.rent_type == 'hours': + units_in_period = ( + next_date - current_date).total_seconds() / 3600 + elif self.rent_type == 'days': + units_in_period = (next_date - current_date).days + + installment_amount = units_in_period * amount_per_unit + + if installment_amount > 0: + self.env['rental.payment.plan'].create({ + 'contract_id': self.id, + 'invoice_item_id': self.invoice_item_id.id, + 'payment_date': current_date, + 'payment_amount': installment_amount, + 'payment_state': 'not_paid', + }) + + current_date = next_date + # Handle any remaining amount due to rounding + remaining_amount = total_amount - sum( + self.rental_payment_plan_ids.mapped('payment_amount')) + if remaining_amount > 0: + self.env['rental.payment.plan'].create({ + 'contract_id': self.id, + 'invoice_item_id': self.invoice_item_id.id, + 'payment_date': drop_date, + 'payment_amount': remaining_amount, + 'payment_state': 'not_paid', + }) + + @api.depends('pickup_date', 'dropoff_date') + def _compute_rental_period(self): + """ + Compute the total rental period in hours and days based on pickup + and drop-off dates. + """ + for record in self: + if record.pickup_date and record.dropoff_date: + pickup = fields.Datetime.from_string(record.pickup_date) + dropoff = fields.Datetime.from_string(record.dropoff_date) + delta = dropoff - pickup + + # Calculate total days + total_days = delta.days + 1 + record.total_days = total_days + + # Calculate total hours + total_hours = delta.total_seconds() / 3600 + record.total_hours = total_hours + + else: + record.total_days = 0 + record.total_hours = 0 + + @api.constrains('rent_type', 'pickup_date', 'dropoff_date', 'total_hours', + 'total_days', ) + def _check_rental_period(self): + """ + Ensure the drop-off date is not before the pick-up date. + """ + for record in self: + if record.pickup_date and record.dropoff_date: + pickup = fields.Datetime.from_string(record.pickup_date) + dropoff = fields.Datetime.from_string(record.dropoff_date) + delta = dropoff - pickup + + if record.rent_type == 'hours': + total_hours_computed = delta.total_seconds() / 3600 + if record.total_hours > total_hours_computed: + raise ValidationError( + f'The total hours ({record.total_hours})' + f' exceed the period between the pickup ' + f'and dropoff dates.') + if record.total_hours == 0: + raise ValidationError( + f'The total hours cannot be zero.') + if record.rent_type == 'days': + total_days_computed = delta.days + 1 + if record.total_days > total_days_computed: + raise ValidationError( + f'The total days ({record.total_days})' + f' exceed the period between the pickup ' + f'and dropoff dates.') + if record.total_days == 0: + raise ValidationError( + f'The total days cannot be zero.') + + def action_account_tab(self): + """View the Invoices in the Smart Tab.""" + return { + 'type': 'ir.actions.act_window', + 'name': 'Invoices', + 'res_model': 'account.move', + 'target': 'current', + 'domain': [('partner_id', '=', self.customer_id.id), + ('vehicle_rental_id', '=', self.id)], + 'view_mode': 'tree,form', + } + + def _compute_vehicle_to_invoice(self): + """ + Computes the number of invoices related to the vehicle rental + contract and updates the 'vehicle_to_invoice_count' field for each record. + """ + for record in self: + record.vehicle_to_invoice_count = self.env[ + 'account.move'].search_count([ + ('vehicle_rental_id', '=', record.id) + ]) + + def action_extra_invoice_charge(self): + """ + Creates an invoice for extra services added to the vehicle + rental contract. If there are no extra services, raises a + ValidationError. + """ + if self.extra_service_ids: + invoice_line_vals = [ + { + 'product_id': line.product_id.id, + 'name': line.description or line.product_id.name, + 'quantity': line.quantity, + 'price_unit': line.amount, + } + for line in self.extra_service_ids + ] + invoice_vals = { + 'move_type': 'out_invoice', + 'partner_id': self.customer_id.id, + 'invoice_line_ids': [(0, 0, line) for line in + invoice_line_vals], + 'vehicle_rental_id': self.id, + } + invoice = self.env['account.move'].create(invoice_vals) + invoice.action_post() + self.is_extra_invoice_created = True + else: + raise ValidationError( + _('Add Extra Services Products.')) + + def action_damage_invoice(self): + """ + This method opens a new window to link invoices and remove invoices + for the current sale order. + """ + return { + "type": "ir.actions.act_window", + "name": "Damage Invoices", + "view_mode": "form", + "res_model": "damage.invoice", + "target": "new", + "context": { + "default_contract_id": self.id, + }, + } + + def action_cancel(self): + """ + Cancels the rental contract by setting its state to 'cancel'. + """ + self.write({'state': 'cancel'}) + + def action_cancel_charges(self): + """ + Creates an invoice for the cancellation charges based on the contract's + cancellation policy. The invoice is created using a predefined product + for cancellation charges. If the cancellation policy is not set, + it raises a ValidationError. + """ + if self.cancellation_policy_id: + product_id = self.env.ref( + 'advanced_fleet_rental.product_product_vehicle_cancel_charge') + invoice_vals = { + 'partner_id': self.customer_id.id, + 'move_type': 'out_invoice', + 'vehicle_rental_id': self.id, + 'invoice_date': date.today(), + 'invoice_line_ids': [(0, 0, { + 'product_id': product_id.id, + 'name': self.cancellation_terms, + 'quantity': 1, + 'price_unit': self.cancellation_charge, + })], + } + invoice = self.env['account.move'].create(invoice_vals) + self.is_cancelled_invoiced = True + return { + 'type': 'ir.actions.act_window', + 'res_model': 'account.move', + 'view_mode': 'form', + 'res_id': invoice.id, + 'target': 'current', + } + else: + raise ValidationError( + _("No cancellation policy set on the contract.")) diff --git a/advanced_fleet_rental/models/fleet_vehicle.py b/advanced_fleet_rental/models/fleet_vehicle.py new file mode 100644 index 000000000..9c95ba427 --- /dev/null +++ b/advanced_fleet_rental/models/fleet_vehicle.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Anfas Faisal K (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from odoo import fields, models + + +class FleetVehicle(models.Model): + """ + Inherits from 'fleet.vehicle' to add additional fields and functionality. + """ + _inherit = 'fleet.vehicle' + + status = fields.Selection([ + ('operational', 'Operational'), + ('undermaintenance', 'Under Maintenance'), + ], default='operational') + rent_hour = fields.Float(string='Rent / Hour', help="Rent per hour") + rent_day = fields.Float(string='Rent / Day', help="Rent per day") + rent_kilometer = fields.Float(string='Rent / Kilometer', + help="Rent per kilometer") + charge_hour = fields.Float(string='Extra Charge / Hour', + help="Extra charge per hour") + charge_day = fields.Float(string='Extra Charge / Day', + help="Extra charge per day") + + charge_kilometer = fields.Float(string='Extra Charge / Kilometer', + help="Extra charge per kilometer") diff --git a/advanced_fleet_rental/models/insurance_policy.py b/advanced_fleet_rental/models/insurance_policy.py new file mode 100644 index 000000000..473e409be --- /dev/null +++ b/advanced_fleet_rental/models/insurance_policy.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Anfas Faisal K (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from odoo import fields, models + + +class InsurancePolicy(models.Model): + """ + Model for managing insurance policies related to fleet rental contracts. + """ + _name = 'insurance.policy' + _description = 'Insurance Policy' + + policy_number = fields.Char( + string='Policy Number', + required=True, + help='Unique identifier for the insurance policy.') + name = fields.Char( + string='Name', + required=True, + help='Name of the insurance policy.') + description = fields.Char( + string='Description', + help='Brief description of the insurance policy.') + document = fields.Binary( + string='Document', + help='Upload the document related to the insurance policy.') + file_name = fields.Char( + string="File Name", + help='File Name of the Document') + + policy_amount = fields.Float( + string='Policy Amount', + help='Total amount covered by the insurance policy.') + contract_id = fields.Many2one('fleet.rental.contract', + string='Contract Rent', + help='Reference to the vehicle rent.') diff --git a/advanced_fleet_rental/models/multi_image.py b/advanced_fleet_rental/models/multi_image.py new file mode 100644 index 000000000..82b896e2b --- /dev/null +++ b/advanced_fleet_rental/models/multi_image.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Anfas Faisal K (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from odoo import fields, models + + +class MultiImage(models.Model): + """ + Model for storing multiple images related to a fleet rental contract. + """ + _name = 'multi.image' + _description = 'Multi Image' + + image = fields.Binary(string="Image", help="Upload the Images") + contract_id = fields.Many2one( + 'fleet.rental.contract', string='Rental Contract', + ondelete='cascade', readonly=True) diff --git a/advanced_fleet_rental/models/rental_payment_plan.py b/advanced_fleet_rental/models/rental_payment_plan.py new file mode 100644 index 000000000..13ff9c191 --- /dev/null +++ b/advanced_fleet_rental/models/rental_payment_plan.py @@ -0,0 +1,105 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2025-TODAY Cybrosys Technologies() +# Author: Anfas Faisal K (odoo@cybrosys.com) +# +# This program is under the terms of the Odoo Proprietary License v1.0(OPL-1) +# It is forbidden to publish, distribute, sublicense, or sell copies of the +# Software or modified copies of the Software. +# +# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### +from datetime import date +from odoo import api, fields, models + + +class RentalPaymentPlan(models.Model): + """ + Model for managing rental payment plans associated with fleet rental + contracts. + """ + _name = 'rental.payment.plan' + _description = 'Rental Payment Plan' + + contract_id = fields.Many2one( + 'fleet.rental.contract', string='Rental Contract', + ondelete='cascade') + invoice_item_id = fields.Many2one('product.product', + string='Invoice Item', ) + payment_date = fields.Date(string='Payment Date' ) + payment_amount = fields.Float( + string='Payment Amount', + help='Amount to be paid based on the invoice item.') + invoice_id = fields.Many2one('account.move', string='Invoice', + readonly=True) + payment_state = fields.Selection( + [ + ('not_paid', 'Not Paid'), + ('in_payment', 'In Payment'), + ('paid', 'Paid'), + ('partial', 'Partially Paid'), + ('reversed', 'Reversed'), + ('invoicing_legacy', 'Invoicing App Legacy'), + ], compute='_compute_payment_state', + string='Payment State') + is_invoiced = fields.Boolean(string="Invoice Button", help="Invoiced") + + @api.depends('invoice_id.payment_state') + def _compute_payment_state(self): + """ + Computes the payment state based on the associated invoice's + payment state. + """ + for record in self: + if record.invoice_id: + record.payment_state = record.invoice_id.payment_state + else: + record.payment_state = 'not_paid' + + def action_create_invoice(self): + """ + Creates an invoice for the payment plan. + """ + self.ensure_one() + invoice_vals = { + 'partner_id': self.contract_id.customer_id.id, + 'move_type': 'out_invoice', + 'invoice_date': self.payment_date, + 'vehicle_rental_id': self.contract_id.id, + 'invoice_line_ids': [(0, 0, { + 'product_id': self.invoice_item_id.id, + 'name': self.invoice_item_id.name, + 'quantity': 1, + 'price_unit': self.payment_amount, + })], + } + invoice = self.env['account.move'].create(invoice_vals) + invoice.action_post() + self.invoice_id = invoice.id + self.is_invoiced = True + return invoice + + @api.model + def _schedule_auto_invoice_checker(self): + """ + Scheduled action to automatically generate invoices for rental payment + plans where the payment date is today. Searches for payment plans with + today's date and no associated invoice, and generates invoices for them. + """ + today = date.today() + payment_plans = self.search([ + ('payment_date', '=', today), + ('invoice_id', '=', False) + ]) + for plan in payment_plans: + plan.action_create_invoice() diff --git a/advanced_fleet_rental/report/fleet_rental_contract_report.xml b/advanced_fleet_rental/report/fleet_rental_contract_report.xml new file mode 100644 index 000000000..9f619f042 --- /dev/null +++ b/advanced_fleet_rental/report/fleet_rental_contract_report.xml @@ -0,0 +1,13 @@ + + + + + Vehicle Rental Report + fleet.rental.contract + qweb-pdf + advanced_fleet_rental.report_fleet_rental_contract + advanced_fleet_rental.report_fleet_rental_contract + + report + + diff --git a/advanced_fleet_rental/report/fleet_rental_contract_template.xml b/advanced_fleet_rental/report/fleet_rental_contract_template.xml new file mode 100644 index 000000000..52e7c8fd6 --- /dev/null +++ b/advanced_fleet_rental/report/fleet_rental_contract_template.xml @@ -0,0 +1,393 @@ + + + + + \ No newline at end of file diff --git a/advanced_fleet_rental/security/ir.model.access.csv b/advanced_fleet_rental/security/ir.model.access.csv new file mode 100644 index 000000000..b62d78f06 --- /dev/null +++ b/advanced_fleet_rental/security/ir.model.access.csv @@ -0,0 +1,8 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_fleet_rental_contract,access.fleet.rental.contract.user,model_fleet_rental_contract,base.group_user,1,1,1,1 +access_rental_payment_plan,access.rental.payment.plan.user,model_rental_payment_plan,base.group_user,1,1,1,1 +access_extra_service,access.extra.service.user,model_extra_service,base.group_user,1,1,1,1 +access_insurance_policy,access.insurance.policy.user,model_insurance_policy,base.group_user,1,1,1,1 +access_multi_image,access.multi.image.user,model_multi_image,base.group_user,1,1,1,1 +access_damage_invoice,access.damage.invoice.user,model_damage_invoice,base.group_user,1,1,1,1 +access_cancellation_policy,access.cancellation.policy.user,model_cancellation_policy,base.group_user,1,1,1,1 diff --git a/advanced_fleet_rental/static/description/assets/cybro-icon.png b/advanced_fleet_rental/static/description/assets/cybro-icon.png new file mode 100644 index 000000000..06e73e11d Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/cybro-icon.png differ diff --git a/advanced_fleet_rental/static/description/assets/cybro-odoo.png b/advanced_fleet_rental/static/description/assets/cybro-odoo.png new file mode 100644 index 000000000..ed02e07a4 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/cybro-odoo.png differ diff --git a/advanced_fleet_rental/static/description/assets/h2.png b/advanced_fleet_rental/static/description/assets/h2.png new file mode 100644 index 000000000..0bfc4707d Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/h2.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/2.png b/advanced_fleet_rental/static/description/assets/icons/2.png new file mode 100644 index 000000000..e4d0f3463 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/2.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/5.png b/advanced_fleet_rental/static/description/assets/icons/5.png new file mode 100644 index 000000000..4cc65413e Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/5.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/check.png b/advanced_fleet_rental/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/check.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/chevron.png b/advanced_fleet_rental/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/chevron.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/cogs.png b/advanced_fleet_rental/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/cogs.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/consultation.png b/advanced_fleet_rental/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/consultation.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/cust.png b/advanced_fleet_rental/static/description/assets/icons/cust.png new file mode 100644 index 000000000..609be902e Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/cust.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/down.svg b/advanced_fleet_rental/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/advanced_fleet_rental/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/advanced_fleet_rental/static/description/assets/icons/ecom-black.png b/advanced_fleet_rental/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/ecom-black.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/education-black.png b/advanced_fleet_rental/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/education-black.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/faq.png b/advanced_fleet_rental/static/description/assets/icons/faq.png new file mode 100644 index 000000000..4250b5b81 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/faq.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/feature.png b/advanced_fleet_rental/static/description/assets/icons/feature.png new file mode 100644 index 000000000..ac7a785c0 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/feature.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/hotel-black.png b/advanced_fleet_rental/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/hotel-black.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/instance-line.png b/advanced_fleet_rental/static/description/assets/icons/instance-line.png new file mode 100755 index 000000000..0727f0835 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/instance-line.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/license.png b/advanced_fleet_rental/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/license.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/lifebuoy.png b/advanced_fleet_rental/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/lifebuoy.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/manufacturing-black.png b/advanced_fleet_rental/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/manufacturing-black.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/notes.png b/advanced_fleet_rental/static/description/assets/icons/notes.png new file mode 100644 index 000000000..ee5e95404 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/notes.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/pos-black.png b/advanced_fleet_rental/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/pos-black.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/pro1.png b/advanced_fleet_rental/static/description/assets/icons/pro1.png new file mode 100644 index 000000000..f6cce34c8 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/pro1.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/puzzle.png b/advanced_fleet_rental/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/puzzle.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/restaurant-black.png b/advanced_fleet_rental/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/restaurant-black.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/screenshot.png b/advanced_fleet_rental/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..cef272529 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/screenshot.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/service-black.png b/advanced_fleet_rental/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/service-black.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/skype.png b/advanced_fleet_rental/static/description/assets/icons/skype.png new file mode 100644 index 000000000..51b409fb3 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/skype.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/star-1.svg b/advanced_fleet_rental/static/description/assets/icons/star-1.svg new file mode 100644 index 000000000..7e55ab162 --- /dev/null +++ b/advanced_fleet_rental/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/advanced_fleet_rental/static/description/assets/icons/star-2.svg b/advanced_fleet_rental/static/description/assets/icons/star-2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/advanced_fleet_rental/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/advanced_fleet_rental/static/description/assets/icons/support.png b/advanced_fleet_rental/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/support.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/test-1 - Copy.png b/advanced_fleet_rental/static/description/assets/icons/test-1 - Copy.png new file mode 100644 index 000000000..f6a902663 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/test-1 - Copy.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/test-1.png b/advanced_fleet_rental/static/description/assets/icons/test-1.png new file mode 100644 index 000000000..0908add2b Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/test-1.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/test-2.png b/advanced_fleet_rental/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..4671fe91e Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/test-2.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/trading-black.png b/advanced_fleet_rental/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/trading-black.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/training.png b/advanced_fleet_rental/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/training.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/update.png b/advanced_fleet_rental/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/update.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/user.png b/advanced_fleet_rental/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/user.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/video.png b/advanced_fleet_rental/static/description/assets/icons/video.png new file mode 100644 index 000000000..576705b17 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/video.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/whatsapp.png b/advanced_fleet_rental/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/whatsapp.png differ diff --git a/advanced_fleet_rental/static/description/assets/icons/wrench.png b/advanced_fleet_rental/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/icons/wrench.png differ diff --git a/advanced_fleet_rental/static/description/assets/modules/1.gif b/advanced_fleet_rental/static/description/assets/modules/1.gif new file mode 100644 index 000000000..ae3a880a2 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/modules/1.gif differ diff --git a/advanced_fleet_rental/static/description/assets/modules/2.jpg b/advanced_fleet_rental/static/description/assets/modules/2.jpg new file mode 100644 index 000000000..a1dc39c89 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/modules/2.jpg differ diff --git a/advanced_fleet_rental/static/description/assets/modules/3.png b/advanced_fleet_rental/static/description/assets/modules/3.png new file mode 100644 index 000000000..8513873ea Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/modules/3.png differ diff --git a/advanced_fleet_rental/static/description/assets/modules/4.png b/advanced_fleet_rental/static/description/assets/modules/4.png new file mode 100644 index 000000000..3bedf7981 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/modules/4.png differ diff --git a/advanced_fleet_rental/static/description/assets/modules/5.png b/advanced_fleet_rental/static/description/assets/modules/5.png new file mode 100644 index 000000000..0e311ca87 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/modules/5.png differ diff --git a/advanced_fleet_rental/static/description/assets/modules/6.jpg b/advanced_fleet_rental/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/modules/6.jpg differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots.zip b/advanced_fleet_rental/static/description/assets/screenshots.zip new file mode 100644 index 000000000..10ea8104d Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots.zip differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/1.png b/advanced_fleet_rental/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..272bd4c3d Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/1.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/10.png b/advanced_fleet_rental/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..320e22f51 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/10.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/11.png b/advanced_fleet_rental/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..e64fe6737 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/11.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/12.png b/advanced_fleet_rental/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..f728a2a67 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/12.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/13.png b/advanced_fleet_rental/static/description/assets/screenshots/13.png new file mode 100644 index 000000000..f0dcf52ac Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/13.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/14.png b/advanced_fleet_rental/static/description/assets/screenshots/14.png new file mode 100644 index 000000000..10f06d469 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/14.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/15.png b/advanced_fleet_rental/static/description/assets/screenshots/15.png new file mode 100644 index 000000000..62579a40e Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/15.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/16.png b/advanced_fleet_rental/static/description/assets/screenshots/16.png new file mode 100644 index 000000000..66db6344c Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/16.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/17.png b/advanced_fleet_rental/static/description/assets/screenshots/17.png new file mode 100644 index 000000000..b2a6605ff Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/17.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/18.png b/advanced_fleet_rental/static/description/assets/screenshots/18.png new file mode 100644 index 000000000..8280b8b95 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/18.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/19.png b/advanced_fleet_rental/static/description/assets/screenshots/19.png new file mode 100644 index 000000000..8939e7c4b Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/19.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/2.png b/advanced_fleet_rental/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..c37d7389a Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/2.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/20.png b/advanced_fleet_rental/static/description/assets/screenshots/20.png new file mode 100644 index 000000000..f932a5d7d Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/20.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/21.png b/advanced_fleet_rental/static/description/assets/screenshots/21.png new file mode 100644 index 000000000..d0bb122b0 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/21.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/22.png b/advanced_fleet_rental/static/description/assets/screenshots/22.png new file mode 100644 index 000000000..4abe6ec83 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/22.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/23.png b/advanced_fleet_rental/static/description/assets/screenshots/23.png new file mode 100644 index 000000000..026d9bf70 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/23.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/24.png b/advanced_fleet_rental/static/description/assets/screenshots/24.png new file mode 100644 index 000000000..b588a5f43 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/24.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/3.png b/advanced_fleet_rental/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..a67fcfbbf Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/3.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/4.png b/advanced_fleet_rental/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..f5cbad850 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/4.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/5.png b/advanced_fleet_rental/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..a92270d1d Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/5.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/6.png b/advanced_fleet_rental/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..57249a507 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/6.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/7.png b/advanced_fleet_rental/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..2255f4b74 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/7.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/8.png b/advanced_fleet_rental/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..47d1224db Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/8.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/9.png b/advanced_fleet_rental/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..f6c324efa Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/9.png differ diff --git a/advanced_fleet_rental/static/description/assets/screenshots/hero-v17.gif b/advanced_fleet_rental/static/description/assets/screenshots/hero-v17.gif new file mode 100644 index 000000000..6389a46a6 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/screenshots/hero-v17.gif differ diff --git a/advanced_fleet_rental/static/description/assets/y18.jpg b/advanced_fleet_rental/static/description/assets/y18.jpg new file mode 100644 index 000000000..eea1714f2 Binary files /dev/null and b/advanced_fleet_rental/static/description/assets/y18.jpg differ diff --git a/advanced_fleet_rental/static/description/banner.jpg b/advanced_fleet_rental/static/description/banner.jpg new file mode 100644 index 000000000..f94fbc93c Binary files /dev/null and b/advanced_fleet_rental/static/description/banner.jpg differ diff --git a/advanced_fleet_rental/static/description/icon.png b/advanced_fleet_rental/static/description/icon.png new file mode 100644 index 000000000..1cc38f921 Binary files /dev/null and b/advanced_fleet_rental/static/description/icon.png differ diff --git a/advanced_fleet_rental/static/description/index.html b/advanced_fleet_rental/static/description/index.html new file mode 100644 index 000000000..58f31610e --- /dev/null +++ b/advanced_fleet_rental/static/description/index.html @@ -0,0 +1,1282 @@ + + + + + + + + + Document + + + + + + + + +
+ +
+
+

+ Advanced Fleet Rental Management +

+

+ Overview of the Fleet Rental Management. +

+
+
+

+ Advanced Fleet Rental Management System Is Designed To Streamline The Process Of Managing A Fleet Of Vehicles For Rental Businesses +

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

+ KEY HIGHLIGHTS +

+
+
+
+
+ +
+
+

+ Advanced Dashboard

+

+ Track all key metrics such as vehicle availability, rental contract statuses, revenue, and maintenance schedules, all in one place.

+
+
+
+
+
+
+ +
+
+

+ Book Vehicle.

+

+ Select customers, input rental details, view available vehicles, and complete bookings directly within the system.

+
+
+
+
+
+
+ +
+
+

+ Flexible Rent Types. +

+

+ Offer various rental types, from hourly to long-term, with automatic adjustments based on the chosen type. +

+
+
+
+
+
+
+ +
+
+

+ Diverse Payment Options. +

+

+ Allow customers to choose from multiple payment intervals, including Daily, Weekly and Monthly. +

+
+
+
+
+
+
+ +
+
+

+ Automated Invoicing. +

+

+ Generate and send invoices automatically based on the rental terms, ensuring timely payments and easy tracking. +

+
+
+
+
+
+
+ +
+
+

+ Extra Services. +

+

+ Easily include additional services, such as insurance or GPS, tailored to specific rental agreements. +

+
+
+
+
+
+
+ +
+
+

+ Insurance Management. +

+

+ Effortlessly manage and integrate insurance policies with rental contracts for comprehensive coverage. +

+
+
+
+
+
+
+ +
+
+

+ Cancellation Policies +

+

+ Allow customers to cancel vehicle rentals with ease, ensuring a smooth and hassle-free experience. +

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

+ Screenshots + + +

+ +
+ +
+

+ Advance Dashboard +

+ +
+ + + +
+ +
+ +
+

+ Vehicles +

+

+ Vehicles Kanban View +

+
+ +
+
+ +
+ +

+ Vehicles Form View +

+
+ +
+
+ +
+

+ Contracts +

+

+ Contract Kanban View.

+
+ +
+

+ Contract Form View. +

+
+ +
+
+ +
+

+ Rental Calculation Based on Rental Duration +

+

+ Set the Pickup date, Drop-off Date , Select the Vehicle and set Rent Type to 'Hours', Total Rental Charge will automatically calculate based on the Pick-up Date and Drop-off Date. +

+
+ +
+

+ Set the Pickup date, Drop-off Date , Select the Vehicle and set Rent Type to 'Days', Total Rental Charge will automatically calculate based on the Pick-up Date and Drop-off Date. + +

+
+ +
+

+ Set the Pickup date, Drop-off Date , Select the Vehicle and set Rent Type to 'Kilometers', Total Rental Charge will automatically calculate based on Total KM. +

+
+ +
+
+ +
+

+ Payment Types. +

+

+ There are 4 types of Payment 'Daily', 'Weekly', 'Monthly' and 'Fully'. +

+
+ +
+

+ Select the Payment Type you want for the Contract and Click on the 'Installment' to generate Installments +

+
+ +
+

+ Automatically the Invoice is Generated based on due Date. +

+
+ +
+

+ Extra Services. +

+

+ Add the Extra Service Product and Click on 'Create Extra Invoice Charges' to generate Invoice for Extra Services +

+
+ +
+

+ Extra Charges Invoice +

+
+ +
+

+ Insurance Policy. +

+

+ Add the Insurance Details for the Vehicle +

+
+ +
+

+ Images. +

+

+ Add the Vehicle Images +

+
+ +
+

+ Vehicle Contract Report. +

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

+

+ +
+

+ FEATURES + + +

+

+ Comprehensive Features of Advanced Fleet Rental Management

+
+ + +
+ +
+
+
+
+ + + +
+ Advanced Dashboard. +
+
+
+
+
+ +
+
+
+
+ + + +
+ Book Vehicle. +
+
+
+
+
+ +
+
+
+
+ + + +
+ Flexible Rent Types.
+
+
+
+
+ +
+
+
+
+ + + +
+ Import Sales Order from WooCommerce to Odoo. +
+
+
+
+
+ +
+
+
+
+ + + +
+ Diverse Payment Options. +
+
+
+
+
+ +
+
+
+
+ + + +
+ Automated Invoicing. +
+
+
+
+
+ +
+
+
+
+ + + +
+ Extra Services. +
+
+
+
+
+ +
+
+
+
+ + + +
+ Insurance Management. +
+
+
+
+
+
+
+
+
+ + + +
+ Cancellation Policies. +
+
+
+
+
+ +
+
+
+ +
+ +
+
+
+

+ RELEASE NOTES + + +

+
+
+
+
+ +
+

Version 17.0.1.0.0 I Updated + on : 29 Auguest 2024 +

+

Initial Commit for Advanced Fleet Rental Management

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

Related Modules

+

Explore our related modules

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

+ 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? Get in touch. +

+
+
+
+
+
+ +
+
+

Need Help?

+

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

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on + WhatsApp!

+ +

+91 + 86068 + 27707

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

Skype

+

Say hi to us on Skype!

+ +

cybroopenerp +

+
+
+
+
+ + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ + + + + + + + diff --git a/advanced_fleet_rental/static/src/css/xero_dashboard.css b/advanced_fleet_rental/static/src/css/xero_dashboard.css new file mode 100644 index 000000000..869d35eaf --- /dev/null +++ b/advanced_fleet_rental/static/src/css/xero_dashboard.css @@ -0,0 +1,78 @@ +.components{ + margin: 40px !important; + border-radius: 17px; + padding-bottom: 25px; +} + +.heading{ + margin-top:15px; + margin-bottom:8px; +} + +.tile{ + height: 125px; + border-radius: 30px; + display: flex; + justify-content: center; + flex-direction: column; +} +.tile:hover{ + box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24),0 17px 50px 0 rgba(0,0,0,0.19); +} +.card:hover{ + box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24),0 17px 50px 0 rgba(0,0,0,0.19); +} + +.chart{ + margin: 40px !important; +} + +.row_table{ + margin: 40px !important; + padding-bottom: 40px; +} +/* Basic styling for the header */ +.contracts-header { + font-family: 'Poppins', 'Open Sans', sans-serif; + font-size: 1.5rem; + font-weight: 600; + color: #333; + margin-bottom: 1.5rem; + padding-bottom: 0.5rem; + position: relative; +} + +/* Option 1: With subtle text shadow */ +.contracts-header-shadow { + text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); +} + +/* Option 2: With gradient text color */ +.contracts-header-gradient { + background: linear-gradient(90deg, #3498db, #2980b9); + -webkit-background-clip: text; + background-clip: text; + color: transparent; +} + +/* Option 3: With icon prefix */ +.contracts-header-icon::before { + content: "📄 "; + margin-right: 8px; +} + +/* Option 4: With subtle background */ +.contracts-header-background { + background-color: #f5f9ff; + padding: 10px 15px; + border-radius: 6px; + border-bottom: none; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); +} + +/* Option 5: Uppercase with letter spacing */ +.contracts-header-uppercase { + text-transform: uppercase; + letter-spacing: 1.5px; + font-size: 1.2rem; +} \ No newline at end of file diff --git a/advanced_fleet_rental/static/src/images/cancelled.svg b/advanced_fleet_rental/static/src/images/cancelled.svg new file mode 100644 index 000000000..e8ab38d12 --- /dev/null +++ b/advanced_fleet_rental/static/src/images/cancelled.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/advanced_fleet_rental/static/src/images/car-insurance.svg b/advanced_fleet_rental/static/src/images/car-insurance.svg new file mode 100644 index 000000000..476938e9d --- /dev/null +++ b/advanced_fleet_rental/static/src/images/car-insurance.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/advanced_fleet_rental/static/src/images/car.svg b/advanced_fleet_rental/static/src/images/car.svg new file mode 100644 index 000000000..137bc0678 --- /dev/null +++ b/advanced_fleet_rental/static/src/images/car.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/advanced_fleet_rental/static/src/images/return.svg b/advanced_fleet_rental/static/src/images/return.svg new file mode 100644 index 000000000..496597409 --- /dev/null +++ b/advanced_fleet_rental/static/src/images/return.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/advanced_fleet_rental/static/src/images/transport.svg b/advanced_fleet_rental/static/src/images/transport.svg new file mode 100644 index 000000000..42f32c4dd --- /dev/null +++ b/advanced_fleet_rental/static/src/images/transport.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/advanced_fleet_rental/static/src/js/fleet_dashboard.js b/advanced_fleet_rental/static/src/js/fleet_dashboard.js new file mode 100644 index 000000000..793f77cd1 --- /dev/null +++ b/advanced_fleet_rental/static/src/js/fleet_dashboard.js @@ -0,0 +1,244 @@ +/** @odoo-module */ +import { registry } from "@web/core/registry"; +import { useService } from "@web/core/utils/hooks" +import { jsonrpc } from "@web/core/network/rpc_service"; + +const { Component, onMounted, onWillStart, useRef, useState } = owl + +export class FleetDashboard extends Component { +/* Extending the component and creating class FleetDashboard */ + setup(){ + this.state = useState({ + data:{}, + chart: [], + }) + this.orm = useService("orm"); + this.action = useService("action"); + this.Invoice = useRef("MonthlyInvoice"); + this.Duration = useRef("ContractDuration"); + onWillStart(async () => { + await this.FetchData(); + }) + onMounted(async () =>{ + this.renderChart(); + }) + } + + async FetchData(){ + /* Function for fetching datas for dashboard */ + this.state.data = await this.orm.call("fleet.dashboard", "get_datas"); + this.state.monthlyInvoices = await this.orm.call("fleet.dashboard", "get_monthly_contract_invoices"); + } + + async renderChart(){ + /* Function for rendering different charts */ + this.charts(this.Invoice.el,'bar',this.state.monthlyInvoices.labels,'Monthly Contract Invoices',this.state.monthlyInvoices.data) + const labels = ['Operational', 'Under Maintenance']; + const data = [this.state.data.operational, this.state.data.under_maintenance]; + this.charts(this.Duration.el,'pie',labels,'Travel',data) + } + + + charts(canvas, type, labels, label, data) { + let backgroundColors, borderColors; + if (type === 'pie') { + // Specific colors for pie chart +backgroundColors = ['rgba(46, 204, 113, 0.8)', 'rgba(231, 76, 60, 0.8)']; // Vibrant Green and Red +borderColors = ['rgba(39, 174, 96, 1)', 'rgba(192, 57, 43, 1)']; // Darker Green and Red + } else { + // Colors for other chart types (like bar) + const colors = [ + 'rgba(75, 192, 192, 0.8)', + 'rgba(54, 162, 235, 0.8)', + 'rgba(255, 206, 86, 0.8)' + ]; + const borders = [ + 'rgba(75, 192, 192, 1)', + 'rgba(54, 162, 235, 1)', + 'rgba(255, 206, 86, 1)' + ]; + backgroundColors = data.map((_, index) => colors[index % colors.length]); + borderColors = data.map((_, index) => borders[index % borders.length]); + } + + const chartConfig = { + type: type, + data: { + labels: labels, + datasets: [ + { + label: label, + data: data, + backgroundColor: backgroundColors, + borderColor: borderColors, + borderWidth: 1 + } + ] + }, + options: { + responsive: true, + plugins: { + legend: { + position: 'top', + }, + title: { + display: true, + text: label + } + } + } + }; + + // Add scales only for bar chart + if (type === 'bar') { + chartConfig.options.scales = { + y: { + beginAtZero: true + } + }; + } + + this.state.chart.push(new Chart(canvas, chartConfig)); +} + + + + + + onClickVehicles(){ + /* Function for viewing Total Vehicles */ + this.action.doAction({ + type: 'ir.actions.act_window', + name: 'Operational Vehicles', + res_model: 'fleet.vehicle', + view_mode: 'tree,form', + context: {'tree_view_ref': 'advanced_fleet_rental.fleet_vehicle_view_tree', + 'form_view_ref': 'advanced_fleet_rental.fleet_vehicle_view_form', + 'create': false + }, + views: [[false, 'list'], [false, 'form']], + }) + } +onClickAvailableVehicles() { + /* Function for viewing Available Vehicles */ + this.action.doAction({ + type: 'ir.actions.act_window', + name: 'Total Vehicles', + res_model: 'fleet.vehicle', + view_mode: 'tree,form', + views: [[false, 'list'], [false, 'form']], + context: { + 'tree_view_ref': 'advanced_fleet_rental.fleet_vehicle_view_tree', + 'form_view_ref': 'advanced_fleet_rental.fleet_vehicle_view_form', + 'create': false}, + target: 'current', + domain: [['status', '=', 'operational']], + }); +} + +onClickUnderMaintenanceVehicles(){ + /* Function for viewing Under Maintenance Vehicles */ + this.action.doAction({ + type: 'ir.actions.act_window', + name: 'Under Maintenance Vehicles', + res_model: 'fleet.vehicle', + view_mode: 'tree,form', + views: [[false, 'list'], [false, 'form']], + context: { + 'tree_view_ref': 'advanced_fleet_rental.fleet_vehicle_view_tree', + 'form_view_ref': 'advanced_fleet_rental.fleet_vehicle_view_form', + 'create': false}, + target: 'current', + domain: [['status', '=', 'undermaintenance']], + }); +} + onClickAllCustomers(){ + /* Function for viewing Customers */ + this.action.doAction({ + type: 'ir.actions.act_window', + name: 'Customers', + res_model: 'res.partner', + view_mode: 'tree,form', + views: [[false, 'list'], [false, 'form']], + context: {"create": false}, + }) + } + onClickInvoices(){ + /* Function for viewing Invoices */ + this.action.doAction({ + type: 'ir.actions.act_window', + name: 'Invoices', + res_model: 'account.move', + view_mode: 'tree,form', + views: [[false, 'list'], [false, 'form']], + context: {"create": false}, + domain: "[('vehicle_rental_id', '!=', False)]" + }) + } + onPendingInvoices(){ + /* Function for viewing Pending Invoices */ + this.action.doAction({ + type: 'ir.actions.act_window', + name: 'Pending Invoices', + res_model: 'account.move', + view_mode: 'tree,form', + views: [[false, 'list'], [false, 'form']], + context: { + create: false + }, + domain: "[('vehicle_rental_id', '!=', False)], ('state', '=', 'posted'), ('payment_state', '!=', 'paid')" + }) + } +onAllContract(){ + /* Function for viewing All Contracts */ + this.action.doAction({ + type: 'ir.actions.act_window', + name: 'All Contracts', + res_model: 'fleet.rental.contract', + view_mode: 'tree,form', + context: {"create": false}, + views: [[false, 'kanban'],[false, 'list'], [false, 'form']], + }) + } +onInProgressContract(){ + /* Function for viewing In progress Contracts */ + this.action.doAction({ + type: 'ir.actions.act_window', + name: 'In Progress Contracts', + res_model: 'fleet.rental.contract', + view_mode: 'tree,form', + context: {"create": false}, + views: [[false, 'kanban'],[false, 'list'], [false, 'form']], + domain: [['state', '=', 'in_progress']], + }) + } + +onReturnContract(){ + /* Function for viewing Return Contracts */ + this.action.doAction({ + type: 'ir.actions.act_window', + name: 'Return Contracts', + res_model: 'fleet.rental.contract', + view_mode: 'tree,form', + context: {"create": false}, + views: [[false, 'kanban'],[false, 'list'], [false, 'form']], + domain: [['state', '=', 'return']], + }) + } + +onCancelContract(){ + /* Function for viewing Cancel Contracts */ + this.action.doAction({ + type: 'ir.actions.act_window', + name: 'Cancelled Contracts', + res_model: 'fleet.rental.contract', + view_mode: 'tree,form', + context: {"create": false}, + views: [[false, 'kanban'],[false, 'list'], [false, 'form']], + domain: [['state', '=', 'cancel']], + }) + } +} + +FleetDashboard.template = "FleetDashboard" +registry.category("actions").add('fleet_dashboard_tag', FleetDashboard) diff --git a/advanced_fleet_rental/static/src/xml/fleet_dashboard.xml b/advanced_fleet_rental/static/src/xml/fleet_dashboard.xml new file mode 100644 index 000000000..31744bd5f --- /dev/null +++ b/advanced_fleet_rental/static/src/xml/fleet_dashboard.xml @@ -0,0 +1,154 @@ + + + +
+
+ +
+
FLEET DASHBOARD
+
+
+ + +
+
+
+
Total Vehicles
+
+
+ + +
+
+
+
Available Vehicles
+
+
+ + +
+
+
+
Under Maintenance
+
+
+ +
+
+
+
All Customers
+
+
+
+
+
+
All Invoices
+
+
+
+
+
+
Pending Invoices
+
+
+
+
+

Contracts Details

+
+
+
+
+ +
Contracts
+

+
+
+
+
+
+
+ +
In Progress
+

+
+
+
+
+
+
+ +
Return
+

+
+
+
+
+
+
+ +
Cancelled
+

+
+
+
+
+
+
+
+
+
+

Monthly Contract Invoices

+
+ +
+
+
+
+
+
+

Vehicle Status

+ +
+ +
+
+
+
+
+
+
diff --git a/advanced_fleet_rental/views/account_move_views.xml b/advanced_fleet_rental/views/account_move_views.xml new file mode 100644 index 000000000..4f209c32c --- /dev/null +++ b/advanced_fleet_rental/views/account_move_views.xml @@ -0,0 +1,15 @@ + + + + + account.move.view.form.inherit.advanced.fleet.rental + account.move + + + + + + + + diff --git a/advanced_fleet_rental/views/cancellation_policy_views.xml b/advanced_fleet_rental/views/cancellation_policy_views.xml new file mode 100644 index 000000000..a66c87c71 --- /dev/null +++ b/advanced_fleet_rental/views/cancellation_policy_views.xml @@ -0,0 +1,49 @@ + + + + cancellation.policy.view.form + cancellation.policy + +
+ +

+ +

+ + + + + + + + +
+
+
+
+ + + cancellation.policy.view.tree + cancellation.policy + + + + + + + + + + Cancellation Policies + cancellation.policy + tree,form + + + + + +
diff --git a/advanced_fleet_rental/views/fleet_dashboard.xml b/advanced_fleet_rental/views/fleet_dashboard.xml new file mode 100644 index 000000000..fb32a6870 --- /dev/null +++ b/advanced_fleet_rental/views/fleet_dashboard.xml @@ -0,0 +1,14 @@ + + + + + Fleet Dashboard + fleet_dashboard_tag + + + + diff --git a/advanced_fleet_rental/views/fleet_rental_contract_views.xml b/advanced_fleet_rental/views/fleet_rental_contract_views.xml new file mode 100644 index 000000000..3584ab004 --- /dev/null +++ b/advanced_fleet_rental/views/fleet_rental_contract_views.xml @@ -0,0 +1,368 @@ + + + + + fleet.rental.contract.view.form + fleet.rental.contract + +
+
+ +
+ +
+

+ +

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