diff --git a/fleet_dashboard/README.rst b/fleet_dashboard/README.rst deleted file mode 100755 index c492f1d89..000000000 --- a/fleet_dashboard/README.rst +++ /dev/null @@ -1,46 +0,0 @@ -.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg - :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - -Fleet Dashboard -=============== -In this dashboard you can get all the details about fleet module - -Configuration -============= -* No additional configurations needed - -License -------- -Affero General Public License, Version 3 -`(AGPL v3). -`__ - -Company -------- -* `Cybrosys Techno Solutions `__ - -Credits -------- -* Developer : (V16) Yadhukrishnan, Contact: odoo@cybrosys.com - -Contacts --------- -* Mail Contact : odoo@cybrosys.com -* Website : https://cybrosys.com - -Bug Tracker ------------ -Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. - -Maintainer -========== -.. image:: https://cybrosys.com/images/logo.png - :target: https://cybrosys.com - -This module is maintained by Cybrosys Technologies. -For support and more information, please visit `Our Website `__ - -Further information -=================== -HTML Description: ``__ diff --git a/fleet_dashboard/__init__.py b/fleet_dashboard/__init__.py deleted file mode 100755 index 1e015eaa4..000000000 --- a/fleet_dashboard/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2023-TODAY Cybrosys Technologies(). -# Author: Yadhukrishnan K (odoo@cybrosys.com) -# -# You can modify it under the terms of the GNU AFFERO -# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. -# -# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE -# (AGPL v3) along with this program. -# If not, see . -################################################################################ -from . import controllers -from . import models diff --git a/fleet_dashboard/__manifest__.py b/fleet_dashboard/__manifest__.py deleted file mode 100755 index 7b9bccbac..000000000 --- a/fleet_dashboard/__manifest__.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2023-TODAY Cybrosys Technologies(). -# Author: Yadhukrishnan K (odoo@cybrosys.com) -# -# You can modify it under the terms of the GNU AFFERO -# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. -# -# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE -# (AGPL v3) along with this program. -# If not, see . -################################################################################ -{ - 'name': 'Fleet Dashboard', - 'version': '16.0.1.0.0', - 'category': 'Industries,Productivity', - 'summary': """User can analyse the fleet module in easy ways """, - 'description': """In this module can see all tha data related to the fleet - module. Flee dashboard contain the graphical representation of the odometer - values, service cost, vehicle status and service types""", - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'maintainer': 'Cybrosys Techno Solutions', - 'website': 'https://www.cybrosys.com', - 'depends': ['base', 'hr', 'fleet'], - "data": ['views/fleet_dashboard_menus.xml'], - 'assets': { - 'web.assets_common': [ - 'fleet_dashboard/static/src/css/fleet_dashboard.css', - ], - 'web.assets_backend': [ - 'fleet_dashboard/static/src/xml/fleet_dashboard_templates.xml', - 'fleet_dashboard/static/src/js/fleet_dashboard.js', - "https://www.gstatic.com/charts/loader.js", - ], - }, - 'images': ['static/description/banner.png'], - 'license': 'AGPL-3', - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/fleet_dashboard/controllers/__init__.py b/fleet_dashboard/controllers/__init__.py deleted file mode 100755 index 275b9b206..000000000 --- a/fleet_dashboard/controllers/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2023-TODAY Cybrosys Technologies(). -# Author: Yadhukrishnan K (odoo@cybrosys.com) -# -# You can modify it under the terms of the GNU AFFERO -# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. -# -# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE -# (AGPL v3) along with this program. -# If not, see . -################################################################################ -from . import fleet_dashboard diff --git a/fleet_dashboard/controllers/fleet_dashboard.py b/fleet_dashboard/controllers/fleet_dashboard.py deleted file mode 100755 index 3ac0c4927..000000000 --- a/fleet_dashboard/controllers/fleet_dashboard.py +++ /dev/null @@ -1,148 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2023-TODAY Cybrosys Technologies(). -# Author: Yadhukrishnan K (odoo@cybrosys.com) -# -# You can modify it under the terms of the GNU AFFERO -# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. -# -# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE -# (AGPL v3) along with this program. -# If not, see . -################################################################################ -from datetime import date, timedelta -from odoo import http -from odoo.http import request - - -class FleetFilter(http.Controller): - """ - The FleetFilter class provides the filter option to the js. - When applying the filter return the corresponding data. - Methods: - fleet_filter(self): - when the page is loaded adding filter options to the selection - field. - return a list variable. - fleet_filter_data(self,**kw): - after applying the filter receiving the values and return the - filtered data. - """ - - @http.route('/fleet/filter', auth='public', type='json') - def fleet_filter(self): - """ - Summary: - transferring data to the selection field that works as a filter - Returns: - type:list of lists , it contains the data for the corresponding - filter. - """ - fleet_vehicle_ids = request.env['fleet.vehicle'].search([]) - driver_list = request.env['res.partner'].search_read([], ['name']) - # Getting vehicles model data - vehicle_list = [{'id': fleet_vehicle_id.model_id.id, - 'name': fleet_vehicle_id.model_id.name} - for fleet_vehicle_id in fleet_vehicle_ids] - vehicle_list = [vehicle for n, vehicle in - enumerate(vehicle_list) if - vehicle not in vehicle_list[:n]] - # Getting vehicles brand data - manufacturers_list = [{'id': fleet_vehicle_id.model_id.brand_id.id, - 'name': fleet_vehicle_id.model_id.brand_id.name} - for fleet_vehicle_id in fleet_vehicle_ids] - manufacturers_list = [manufacturer for n, manufacturer in - enumerate(manufacturers_list) if - manufacturer not in manufacturers_list[:n]] - filter_list = [driver_list, vehicle_list, manufacturers_list] - return filter_list - - @http.route('/fleet_dashboard/filter_data', auth='public', type='json') - def fleet_filter_data(self, **kw): - """ - Summary: - transferring data to the selection field that works as a filter - Args: - kw(dict):This parameter contain value of selection field - Returns: - type:list of lists , it contains the data for the corresponding - filter and transferring data to ui after filtration. - """ - data = kw.get('data') - driver = [partner.id for partner in - request.env['res.partner'].search([])] \ - if data['driver'] == 'null' else [int(data['driver'])] - vehicle = [fleet_vehicle_id.id for fleet_vehicle_id in - request.env['fleet.vehicle.model'].search([])] \ - if data['vehicle'] == 'null' else [int(data['vehicle'])] - fleet_vehicle_list = [request.env['fleet.vehicle'].search([ - ("model_id", '=', rec)]).id for rec in vehicle] - manufacturer = [fleet_vehicle_id.model_id.brand_id.id for - fleet_vehicle_id in - request.env['fleet.vehicle'].search([])] \ - if data['manufacturer'] == 'null' else [int(data['manufacturer'])] - if data['date'] == 'null': - fleet_vehicle_odometer_ids = request.env[ - 'fleet.vehicle.odometer'].search( - [("vehicle_id.id", 'in', vehicle), - ("vehicle_id.brand_id.id", "in", manufacturer), - ("driver_id.id", "in", driver)]) - fleet_vehicle_log_contract_ids = request.env[ - 'fleet.vehicle.log.contract'].search( - [("vehicle_id.model_id.id", 'in', vehicle), - ("vehicle_id.model_id.brand_id.id", 'in', manufacturer), - ("state", "not in", ['expired', 'closed']), - ("purchaser_id.id", "in", driver)]) - fleet_vehicle_log_services_ids = request.env[ - 'fleet.vehicle.log.services'].search( - [("vehicle_id.model_id.id", 'in', vehicle), - ("vehicle_id.model_id.brand_id.id", 'in', manufacturer), - ("purchaser_id.id", "in", driver)]) - else: - range_date = date.today() - timedelta(days=int(data['date'])) - fleet_vehicle_odometer_ids = request.env[ - 'fleet.vehicle.odometer'].search( - [("vehicle_id.id", 'in', vehicle), - ("vehicle_id.brand_id.id", "in", manufacturer), - ("driver_id.id", "in", driver), - ("date", ">", range_date)]) - fleet_vehicle_log_contract_ids = request.env[ - 'fleet.vehicle.log.contract'].search( - [("vehicle_id.model_id.id", 'in', vehicle), - ("vehicle_id.model_id.brand_id.id", 'in', manufacturer), - ("state", "not in", ['expired', 'closed']), - ("purchaser_id.id", "in", driver), - ("expiration_date", ">", range_date)]) - fleet_vehicle_log_services_ids = request.env[ - 'fleet.vehicle.log.services'].search( - [("vehicle_id.model_id.id", 'in', vehicle), - ("vehicle_id.model_id.brand_id.id", 'in', manufacturer), - ("purchaser_id.id", "in", driver), ("date", ">", range_date)]) - # Getting total odometer value - total_odometer = sum(fleet_vehicle_odometer_ids.mapped('value')) - admin_odometer_list = [fleet_vehicle_odometer_id.id for - fleet_vehicle_odometer_id in - fleet_vehicle_odometer_ids] - # Getting total service cost - service_cost = sum(fleet_vehicle_log_services_ids.mapped('amount')) - admin_fleet_cost_list = [fleet_vehicle_log_services_id.id for - fleet_vehicle_log_services_id in - fleet_vehicle_log_services_ids] - # Getting total recurring cost - recurring_cost = sum( - fleet_vehicle_log_contract_ids.mapped('cost_generated')) - admin_recurring_list = [fleet_vehicle_log_contract_id.id for - fleet_vehicle_log_contract_id in - fleet_vehicle_log_contract_ids] - return [total_odometer, service_cost, recurring_cost, - admin_odometer_list, admin_fleet_cost_list, - admin_recurring_list, fleet_vehicle_list, vehicle, - manufacturer, len(fleet_vehicle_list)] diff --git a/fleet_dashboard/doc/RELEASE_NOTES.md b/fleet_dashboard/doc/RELEASE_NOTES.md deleted file mode 100755 index 9fde5c719..000000000 --- a/fleet_dashboard/doc/RELEASE_NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -## Module - -#### 02.11.2023 -#### Version 16.0.1.0.0 -##### ADD -- Initial Commit for Fleet Dashboard diff --git a/fleet_dashboard/models/__init__.py b/fleet_dashboard/models/__init__.py deleted file mode 100755 index 8c795f1ef..000000000 --- a/fleet_dashboard/models/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2023-TODAY Cybrosys Technologies(). -# Author: Yadhukrishnan K (odoo@cybrosys.com) -# -# You can modify it under the terms of the GNU AFFERO -# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. -# -# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE -# (AGPL v3) along with this program. -# If not, see . -################################################################################ -from . import fleet_vehicle diff --git a/fleet_dashboard/models/fleet_vehicle.py b/fleet_dashboard/models/fleet_vehicle.py deleted file mode 100755 index 30b03de4f..000000000 --- a/fleet_dashboard/models/fleet_vehicle.py +++ /dev/null @@ -1,252 +0,0 @@ -# -*- coding: utf-8 -*- -################################################################################ -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2023-TODAY Cybrosys Technologies(). -# Author: Yadhukrishnan K (odoo@cybrosys.com) -# -# You can modify it under the terms of the GNU AFFERO -# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. -# -# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE -# (AGPL v3) along with this program. -# If not, see . -################################################################################ -from datetime import date, timedelta -from odoo import api, models - - -class FleetVehicle(models.Model): - """ - The FleetVehicle class provides the data to the js when the dashboard is - loaded. - Methods: - get_tiles_data(self): - when the page is loaded get the data from different models and - transfer to the js file. - return a dictionary variable. - get_graph_data(self, month, flag, model_ids): - month and flag are Integer variables and model_ids is object. - In this methode getting data to the corresponding month from the - model_ids and return - it to the get_tiles_data methode. return a list variable. - """ - _inherit = 'fleet.vehicle' - - @api.model - def get_tiles_data(self): - """ - Summary: - when the page is loaded get the data from different models and - transfer to the js file. - return a dictionary variable. - return: - type:It is a dictionary variable. This dictionary contain data that - affecting the dashboard view. - """ - # Checking login user is manager or not. - if self.env.user.user_has_groups('fleet.fleet_group_manager'): - flag = 1 - fleet_vehicle_odometer_ids = self.env[ - 'fleet.vehicle.odometer'].search([]) - fleet_vehicle_log_services_ids = self.env[ - 'fleet.vehicle.log.services'].search([]) - service_type_list = [['Service Type', 'Total Repair']] - # Getting service type and it's total services. - for fleet_service_type_id in self.env['fleet.service.type'].search([]): - service_types_list = [fleet_service_type_id.name, - self.env['fleet.vehicle.log.services'] - .search_count([('service_type_id', '=', - fleet_service_type_id.id)])] - if service_types_list not in service_type_list: - service_type_list.append(service_types_list) - fleet_vehicle_log_contract_ids = self.env[ - 'fleet.vehicle.log.contract'].search([]) - filtered_fleet_vehicle_log_contract_ids = \ - fleet_vehicle_log_contract_ids.filtered( - lambda fleet_vehicle_log_contract_id: - fleet_vehicle_log_contract_id.state not in [ - 'expired', - 'closed']) - fleet_model_list = [fleet_vehicle_id.model_id.id for - fleet_vehicle_id in self.env - ['fleet.vehicle'].search([])] - fleet_model_list = [fleet_model for n, fleet_model in - enumerate(fleet_model_list) if - fleet_model not in fleet_model_list[:n]] - fleet_manufacture_list = [fleet_vehicle_id.model_id.brand_id.id for - fleet_vehicle_id in - self.env['fleet.vehicle'].search([])] - fleet_manufacture_list = [fleet_manufacture for n, fleet_manufacture - in enumerate(fleet_manufacture_list) if - fleet_manufacture not in - fleet_manufacture_list[:n]] - return { - 'total_odometer': sum( - fleet_vehicle_odometer_ids.mapped('value')), - 'service_cost': sum( - fleet_vehicle_log_services_ids.mapped('amount')), - 'recurring_cost': sum( - filtered_fleet_vehicle_log_contract_ids.mapped( - 'cost_generated')), - 'all_vehicles': self.env['fleet.vehicle'].search_count([]), - 'service_type': service_type_list, - 'service_cost_list': self.get_graph_data(6, 1, self.env[ - 'fleet.vehicle.log.services'].search([])), - 'odometer_value_list': self.get_graph_data(13, 0, - fleet_vehicle_odometer_ids), - 'fleet_state': [{'state': fleet_vehicle_state_id.name, - 'number': self.env[ - 'fleet.vehicle'].search_count( - [('state_id', '=', - fleet_vehicle_state_id.id)])} - for fleet_vehicle_state_id in - self.env['fleet.vehicle.state'].search( - [])], - 'admin_odometer_list': [fleet_vehicle_odometer_id.id - for fleet_vehicle_odometer_id in - fleet_vehicle_odometer_ids], - 'admin_fleet_cost_list': [fleet_vehicle_log_services_id.id for - fleet_vehicle_log_services_id in - fleet_vehicle_log_services_ids], - 'admin_recurring_list': [fleet_vehicle_log_contract_id.id for - fleet_vehicle_log_contract_id in - fleet_vehicle_log_contract_ids if - fleet_vehicle_log_contract_id.state not in [ - 'expired', - 'closed']], - 'fleet_vehicle_list': [fleet_vehicle_id.id for fleet_vehicle_id - in - self.env['fleet.vehicle'].search([])], - 'fleet_model_list': fleet_model_list, - 'fleet_manufacture_list': fleet_manufacture_list, - 'flag': flag, - } - else: - flag = 0 - fleet_vehicle_odometer_ids = self.env[ - 'fleet.vehicle.odometer'].search( - [('vehicle_id.manager_id.id', '=', self.env.uid)]) - # Getting total odometer value. - fleet_vehicle_log_services_ids = self.env[ - 'fleet.vehicle.log.services'].search( - [('vehicle_id.manager_id.id', '=', self.env.uid)]) - # Getting total service cost. - service_type_list = [['Service Type', 'Total Repair']] - # Getting service type and it's total services. - for fleet_service_type_id in self.env['fleet.service.type'].search( - []): - service_types_list = [fleet_service_type_id.name, - self.env['fleet.vehicle.log.services']. - search_count( - [('service_type_id', '=', - fleet_service_type_id.id), - ('vehicle_id.manager_id.id', '=', - self.env.uid)])] - if service_types_list not in service_type_list: - service_type_list.append(service_types_list) - fleet_vehicle_log_contract_ids = self.env[ - 'fleet.vehicle.log.contract'].search([]) - filtered_fleet_vehicle_log_contract_ids = \ - fleet_vehicle_log_contract_ids.filtered( - lambda fleet_vehicle_log_contract_id: - fleet_vehicle_log_contract_id.state not in [ - 'expired', - 'closed']) - fleet_vehicle_ids = self.env['fleet.vehicle'].search([]) - # Getting vehicle status and total number vehicles for the - # Corresponding state. - model_list = [fleet_vehicle_id.model_id.id for fleet_vehicle_id in - fleet_vehicle_ids] - model_list = [model for n, model in enumerate(model_list) if - model not in model_list[:n]] - manufacture_list = [fleet_vehicle_id.model_id.brand_id.id for - fleet_vehicle_id in fleet_vehicle_ids] - manufacture_list = [manufacture for n, manufacture in - enumerate(manufacture_list) if - manufacture not in manufacture_list[:n]] - return { - 'total_odometer': sum( - fleet_vehicle_odometer_ids.mapped('value')), - 'service_cost': sum( - fleet_vehicle_log_services_ids.mapped('amount')), - 'recurring_cost': sum( - filtered_fleet_vehicle_log_contract_ids.mapped( - 'cost_generated')), - 'all_vehicles': self.env['fleet.vehicle'].search_count([]), - 'service_type': service_type_list, - 'service_cost_list': self.get_graph_data(6, 1, self.env[ - 'fleet.vehicle.log.services'].search( - [('vehicle_id.manager_id.id', '=', self.env.uid)])), - 'odometer_value_list': self.get_graph_data(13, 0, - fleet_vehicle_odometer_ids), - 'fleet_state': [{'state': fleet_vehicle_state_id.name, - 'number': self.env['fleet.vehicle'].search_count( - [('state_id', '=', - fleet_vehicle_state_id.id)])} - for fleet_vehicle_state_id in - self.env['fleet.vehicle.state'].search( - [])], - 'flag': flag, - 'model_list': model_list, - 'manufacture_list': manufacture_list - } - - def get_graph_data(self, month, flag, model_ids): - """ - summary: - In this meth ode getting data to the corresponding month from the - model_ids and return - it to the get_tiles_data methode. - Args: - month(int): This parameter used to calculate the month range. - flag(int): This parameter used to differentiate the need and - performing different functions. - model_ids(obj): This parameter used to identify the model to - performs the function. - Returns: - type:list of lists , it contains the data for the corresponding - month. - """ - data_list = [['Month', '']] - # Getting last "month" range - for i in range(0, month): - previous_month = date.today().replace(day=5) - timedelta( - days=i * 30) - first_day_of_previous_month = previous_month.replace(day=1) - last_day_of_previous_month = previous_month.replace( - day=1) + timedelta(days=32) - last_day_of_previous_month = last_day_of_previous_month.replace( - day=1) - timedelta(days=1) - monthly_service_cost = 0 - if flag == 1: - # Getting data to the corresponding month and append to - # The data_list - for fleet_vehicle_log_services_id in model_ids: - if first_day_of_previous_month < \ - fleet_vehicle_log_services_id.date < \ - last_day_of_previous_month: - monthly_service_cost += \ - fleet_vehicle_log_services_id.amount - data_list.append([ - previous_month.strftime("%b"), monthly_service_cost - ]) - else: - # Getting data to the corresponding month and append to the - # data_list - monthly_odometer_value = 0 - for fleet_vehicle_odometer_id in model_ids: - if first_day_of_previous_month < \ - fleet_vehicle_odometer_id.date < \ - last_day_of_previous_month: - monthly_odometer_value += \ - fleet_vehicle_odometer_id.value - data_list.append( - [previous_month.strftime("%b-%y"), monthly_odometer_value]) - return data_list diff --git a/fleet_dashboard/static/description/assets/icons/check.png b/fleet_dashboard/static/description/assets/icons/check.png deleted file mode 100755 index c8e85f51d..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/check.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/chevron.png b/fleet_dashboard/static/description/assets/icons/chevron.png deleted file mode 100755 index 2089293d6..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/chevron.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/cogs.png b/fleet_dashboard/static/description/assets/icons/cogs.png deleted file mode 100755 index 95d0bad62..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/cogs.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/consultation.png b/fleet_dashboard/static/description/assets/icons/consultation.png deleted file mode 100755 index 8319d4baa..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/consultation.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/ecom-black.png b/fleet_dashboard/static/description/assets/icons/ecom-black.png deleted file mode 100755 index a9385ff13..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/ecom-black.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/education-black.png b/fleet_dashboard/static/description/assets/icons/education-black.png deleted file mode 100755 index 3eb09b27b..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/education-black.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/hotel-black.png b/fleet_dashboard/static/description/assets/icons/hotel-black.png deleted file mode 100755 index 130f613be..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/hotel-black.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/license.png b/fleet_dashboard/static/description/assets/icons/license.png deleted file mode 100755 index a5869797e..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/license.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/lifebuoy.png b/fleet_dashboard/static/description/assets/icons/lifebuoy.png deleted file mode 100755 index 658d56ccc..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/lifebuoy.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/manufacturing-black.png b/fleet_dashboard/static/description/assets/icons/manufacturing-black.png deleted file mode 100755 index 697eb0e9f..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/manufacturing-black.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/pos-black.png b/fleet_dashboard/static/description/assets/icons/pos-black.png deleted file mode 100755 index 97c0f90c1..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/pos-black.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/puzzle.png b/fleet_dashboard/static/description/assets/icons/puzzle.png deleted file mode 100755 index 65cf854e7..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/puzzle.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/restaurant-black.png b/fleet_dashboard/static/description/assets/icons/restaurant-black.png deleted file mode 100755 index 4a35eb939..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/restaurant-black.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/service-black.png b/fleet_dashboard/static/description/assets/icons/service-black.png deleted file mode 100755 index 301ab51cb..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/service-black.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/trading-black.png b/fleet_dashboard/static/description/assets/icons/trading-black.png deleted file mode 100755 index 9398ba2f1..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/trading-black.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/training.png b/fleet_dashboard/static/description/assets/icons/training.png deleted file mode 100755 index 884ca024d..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/training.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/update.png b/fleet_dashboard/static/description/assets/icons/update.png deleted file mode 100755 index ecbc5a01a..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/update.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/user.png b/fleet_dashboard/static/description/assets/icons/user.png deleted file mode 100755 index 6ffb23d9f..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/user.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/icons/wrench.png b/fleet_dashboard/static/description/assets/icons/wrench.png deleted file mode 100755 index 6c04dea0f..000000000 Binary files a/fleet_dashboard/static/description/assets/icons/wrench.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/misc/categories.png b/fleet_dashboard/static/description/assets/misc/categories.png deleted file mode 100755 index bedf1e0b1..000000000 Binary files a/fleet_dashboard/static/description/assets/misc/categories.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/misc/check-box.png b/fleet_dashboard/static/description/assets/misc/check-box.png deleted file mode 100755 index 42caf24b9..000000000 Binary files a/fleet_dashboard/static/description/assets/misc/check-box.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/misc/compass.png b/fleet_dashboard/static/description/assets/misc/compass.png deleted file mode 100755 index d5fed8faa..000000000 Binary files a/fleet_dashboard/static/description/assets/misc/compass.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/misc/corporate.png b/fleet_dashboard/static/description/assets/misc/corporate.png deleted file mode 100755 index 2eb13edbf..000000000 Binary files a/fleet_dashboard/static/description/assets/misc/corporate.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/misc/customer-support.png b/fleet_dashboard/static/description/assets/misc/customer-support.png deleted file mode 100755 index 79efc72ed..000000000 Binary files a/fleet_dashboard/static/description/assets/misc/customer-support.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/misc/cybrosys-logo.png b/fleet_dashboard/static/description/assets/misc/cybrosys-logo.png deleted file mode 100755 index cc3cc0ccf..000000000 Binary files a/fleet_dashboard/static/description/assets/misc/cybrosys-logo.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/misc/features.png b/fleet_dashboard/static/description/assets/misc/features.png deleted file mode 100755 index b41769f77..000000000 Binary files a/fleet_dashboard/static/description/assets/misc/features.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/misc/logo.png b/fleet_dashboard/static/description/assets/misc/logo.png deleted file mode 100755 index 478462d3e..000000000 Binary files a/fleet_dashboard/static/description/assets/misc/logo.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/misc/pictures.png b/fleet_dashboard/static/description/assets/misc/pictures.png deleted file mode 100755 index 56d255fe9..000000000 Binary files a/fleet_dashboard/static/description/assets/misc/pictures.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/misc/pie-chart.png b/fleet_dashboard/static/description/assets/misc/pie-chart.png deleted file mode 100755 index 426e05244..000000000 Binary files a/fleet_dashboard/static/description/assets/misc/pie-chart.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/misc/right-arrow.png b/fleet_dashboard/static/description/assets/misc/right-arrow.png deleted file mode 100755 index 730984a06..000000000 Binary files a/fleet_dashboard/static/description/assets/misc/right-arrow.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/misc/star.png b/fleet_dashboard/static/description/assets/misc/star.png deleted file mode 100755 index 2eb9ab29f..000000000 Binary files a/fleet_dashboard/static/description/assets/misc/star.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/misc/support.png b/fleet_dashboard/static/description/assets/misc/support.png deleted file mode 100755 index 4f18b8b82..000000000 Binary files a/fleet_dashboard/static/description/assets/misc/support.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/misc/whatsapp.png b/fleet_dashboard/static/description/assets/misc/whatsapp.png deleted file mode 100755 index d513a5356..000000000 Binary files a/fleet_dashboard/static/description/assets/misc/whatsapp.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/modules/l1.png b/fleet_dashboard/static/description/assets/modules/l1.png deleted file mode 100755 index ed175b076..000000000 Binary files a/fleet_dashboard/static/description/assets/modules/l1.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/modules/l2.png b/fleet_dashboard/static/description/assets/modules/l2.png deleted file mode 100755 index a3194264c..000000000 Binary files a/fleet_dashboard/static/description/assets/modules/l2.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/modules/l3.png b/fleet_dashboard/static/description/assets/modules/l3.png deleted file mode 100755 index e894393ef..000000000 Binary files a/fleet_dashboard/static/description/assets/modules/l3.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/modules/l4.png b/fleet_dashboard/static/description/assets/modules/l4.png deleted file mode 100755 index f3c986fc1..000000000 Binary files a/fleet_dashboard/static/description/assets/modules/l4.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/modules/l5.png b/fleet_dashboard/static/description/assets/modules/l5.png deleted file mode 100755 index b21837312..000000000 Binary files a/fleet_dashboard/static/description/assets/modules/l5.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/modules/l6.png b/fleet_dashboard/static/description/assets/modules/l6.png deleted file mode 100755 index e64a5b55c..000000000 Binary files a/fleet_dashboard/static/description/assets/modules/l6.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/screenshots/Screenshot.jpg b/fleet_dashboard/static/description/assets/screenshots/Screenshot.jpg deleted file mode 100755 index 2f3727dff..000000000 Binary files a/fleet_dashboard/static/description/assets/screenshots/Screenshot.jpg and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/screenshots/Screenshot2.jpg b/fleet_dashboard/static/description/assets/screenshots/Screenshot2.jpg deleted file mode 100755 index df563bafd..000000000 Binary files a/fleet_dashboard/static/description/assets/screenshots/Screenshot2.jpg and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/screenshots/Screenshot3.jpg b/fleet_dashboard/static/description/assets/screenshots/Screenshot3.jpg deleted file mode 100755 index e178be2ec..000000000 Binary files a/fleet_dashboard/static/description/assets/screenshots/Screenshot3.jpg and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/screenshots/Screenshot4.jpg b/fleet_dashboard/static/description/assets/screenshots/Screenshot4.jpg deleted file mode 100755 index 74d17faa6..000000000 Binary files a/fleet_dashboard/static/description/assets/screenshots/Screenshot4.jpg and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/screenshots/Screenshot5.png b/fleet_dashboard/static/description/assets/screenshots/Screenshot5.png deleted file mode 100644 index 95c6a131f..000000000 Binary files a/fleet_dashboard/static/description/assets/screenshots/Screenshot5.png and /dev/null differ diff --git a/fleet_dashboard/static/description/assets/screenshots/hero.gif b/fleet_dashboard/static/description/assets/screenshots/hero.gif deleted file mode 100755 index a96bd79ef..000000000 Binary files a/fleet_dashboard/static/description/assets/screenshots/hero.gif and /dev/null differ diff --git a/fleet_dashboard/static/description/banner.png b/fleet_dashboard/static/description/banner.png deleted file mode 100644 index c6087e6d4..000000000 Binary files a/fleet_dashboard/static/description/banner.png and /dev/null differ diff --git a/fleet_dashboard/static/description/icon.png b/fleet_dashboard/static/description/icon.png deleted file mode 100644 index f4a1eaae3..000000000 Binary files a/fleet_dashboard/static/description/icon.png and /dev/null differ diff --git a/fleet_dashboard/static/description/index.html b/fleet_dashboard/static/description/index.html deleted file mode 100755 index 634acc347..000000000 --- a/fleet_dashboard/static/description/index.html +++ /dev/null @@ -1,637 +0,0 @@ -
- -
- -
-
- Enterprise -
-
- Community -
-
- Odoo.sh -
-
-
- -
-
-
- -

- Fleet Dashboard -

-

In this dashboard you can get all the details about fleet module.

- - -
-
-
-
- - -
-
- -
-

Explore This - Module

-
- - - - -
-
- -
-

Overview -

-
-
-
- In this module, user can see all tha data related to the fleet - module. Fleet dashboard contain the graphical representation of the odometer - values, service cost, vehicle status and service types. -
- -
- - - -
-
- -
-

Features -

-
-
-
-
- - This module provides the detailed graph view of Odometer -
-
- - The module provides the view of the service cost in last six months. -
-
-
- -
- - Can see Drivers and Contracts information. -
- - User can get details about Vehicles, Manufacturers, Models and Vehicle Status -
-
- - - -
-
- -
-

Screenshots -

-
-
-
- -
-

Dynamic And Clickable Dashboard Tiles - -

-

- Users can click the tiles, which display a detailed view of the corresponding tiles. -

- -
-
-

Dynamic Filters - -

-

- Users can apply the filters based on their requirements. -

- -
-
-

Different Types of Graphs -

-

The Fleet Dashboard has different types of graphs that will give you a complete analysis of the Fleet Module. -

- -
- -
- -
- -
-

Vehicle Table - -

-

User can see all vehicles and its current status. -

- -
- -
-
- - - -
-
- -
-

- Related - Products -

-
-
-
- -
-
- - - - -
-
- -
-

- Our Services -

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

- Our - Industries -

-
- -
-
-
-
- -
- Trading -
-

- Easily procure - and - sell your products

-
-
- -
-
- -
- POS -
-

- Easy - configuration - and convivial experience

-
-
- -
-
- -
- Education -
-

- A platform for - educational management

-
-
- -
-
- -
- Manufacturing -
-

- Plan, track and - schedule your operations

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

- Mobile - friendly, - awe-inspiring product pages

-
-
- -
-
- -
- Service Management -
-

- Keep track of - services and invoice

-
-
- -
-
- -
- Restaurant -
-

- Run your bar or - restaurant methodically

-
-
- -
-
- -
- Hotel Management -
-

- An - all-inclusive - hotel management application

-
-
-
-
- - - - -
-
- -
-

- Support -

-
-
-
-
-
-
- -
-
-

Need Help?

-

Got questions or need help? - Get in touch.

- -

- odoo@cybrosys.com

-
-
-
-
-
-
-
- -
-
-

WhatsApp

-

Say hi to us on WhatsApp!

- -

- +91 86068 - 27707

-
-
-
-
-
-
-
- -
-
-
- \ No newline at end of file diff --git a/fleet_dashboard/static/src/css/fleet_dashboard.css b/fleet_dashboard/static/src/css/fleet_dashboard.css deleted file mode 100755 index 7123ac33a..000000000 --- a/fleet_dashboard/static/src/css/fleet_dashboard.css +++ /dev/null @@ -1,222 +0,0 @@ -.fleet_select{ - width:200px; - margin-right:10px; - margin-left:10px; - background-color:#827c93; !important; - color: #fff; - padding-left:7px; -} -.content_fleet_external{ - transition: 0.5s; - box-shadow: 5px 5px 30px; -} -.card-body{ - margin-bottom:10px; -} -.content_fleet_external:hover{ - transform: translateY(-5px); - box-shadow: 10px 10px 10px; - cursor:pointer; -} -.fleet_content{ - height:auto; -} -.fleet_main{ - margin-top: 40px; - margin-left: 2%; - width:96%; -} -.fleet_content_main{ - margin-left:10px; - height:24vh; -} -.fleet_content_graph{ - margin-left:10px; - height:24vh; -} -.fleet_content_graph_inner{ - height:20vh; -} -.fleet_img_content{ - width=170px; - height:170px; - margin-left:30px; - margin-top:10px; -} -.fleet_other_info{ - height:14vh; - margin-left:10px; - margin-bottom:10px; -} -.o_action_manager { - overflow: auto !important; -} -.oh_dashboards{ - overflow-y: scroll; - -moz-overflow-y: scroll; - -webkit-overflow-y: scroll; - -ms-overflow-y: scroll; - -o-overflow-y: scroll; - vertical-align: middle; - overflow-x: clip; - max-height: -webkit-fill-available; - background-color:#FFF; -} -#table_status { - width: 80%; - margin-left: 49px; - margin-top: 30px; - font-family: Arial, Helvetica, sans-serif; -} -#table_status tr:nth-child(even){background-color: #f2f2f2;} -#table_status tr:hover {background-color: #ddd;} -.fleet-pill { - align-items: center; - font-family: "Open Sans", Arial, Verdana, sans-serif; - font-weight: bold; - font-size: 11px; - display: inline-block; - height: 100%; - white-space: nowrap; - width: auto; - position: relative; - border-radius: 100px; - line-height: 1; - overflow: hidden; - padding: 0px 8px 0px 7px; - text-overflow: ellipsis; - line-height: 1.25rem; - color: #fff; - word-break: break-word; - background: #0253e8; -} -.fleet_content_titles { - text-align: center; - margin-top: 74px; - margin-left: -18px; -} -.align_center{ - text-align:center; -} -.fleet_container { - padding: 50px 0; - text-align: center; -} -.chart { - position: relative; - display: inline-block; - color: #999; - font-size: 20px; - text-align: center; - margin-top: -43px; - margin-left:-4px; - } -.chart figcaption { - padding: 50px 25px; - width: 190px; - height: 190px; - border: 20px solid #f0e4eb; - border-radius: 100px; - line-height: 50px; -} -.chart img { - position: absolute; - max-width: 100px; - max-height: 100px; - background: white; -} -.img_ext { - top: 50px; - left: 45px; -} -.chart svg { - position: absolute; - top: 0; - left: 0; -} -.outer { - fill: transparent; - stroke: #333; - stroke-width: 20; - stroke-dasharray: 534; - transition: stroke-dashoffset 2s; - -webkit-animation-play-state: running; - /* firefox bug fix - won't rotate at 90deg angles */ - -moz-transform: rotate(-89deg) translateX(-190px); -} -.chart:hover .outer { - stroke-dashoffset: 534 !important; - -webkit-animation-play-state: paused; -} -/* END Circle colors and graphic positions */ -.chart[data-percent='75'] .outer { - stroke-dashoffset: 133; - -webkit-animation: show75 3s; - animation: show75 3s; -} -.fleet_icon-div{ - font-size:25px; - color:#fff; - background-color:#ffac00; - height:14vh; -} -.fleet_icon-content{ - height:24vh; - font-size:40px; - } -.fleet_icon-content i{ - margin-top:9vh; - color:#fff; -} -.fleet_border-content{ - background-color: #fff; - border: solid; - border-width: 1px; -} -@-webkit-keyframes show75 { - from { - stroke-dashoffset: 537; - } - to { - stroke-dashoffset: 134; - } -} -@keyframes show75 { - from { - stroke-dashoffset: 537; - } - to { - stroke-dashoffset: 124; - } -} -@media (min-width: 1374px) and (max-width: 1873px){ - .fleet_content_graph{ - width:64% !important; - } - .fleet_content_main{ - width:31.5% !important; - } - .fleet_img_content{ - margin-left:0px; - } -} -@media (min-width: 1024px) and (max-width: 1374px){ - .fleet_content_graph{ - width:64% !important; - } - .fleet_content_main{ - width:31.5% !important; - } - .fleet_img_content{ - width:96%; - margin-left:0px; - height:auto !important; - } - .card-body:first-child{ - - display:flex; - align-items:center; - max-width:110px; - - } - } diff --git a/fleet_dashboard/static/src/js/fleet_dashboard.js b/fleet_dashboard/static/src/js/fleet_dashboard.js deleted file mode 100755 index 6c1474fc0..000000000 --- a/fleet_dashboard/static/src/js/fleet_dashboard.js +++ /dev/null @@ -1,278 +0,0 @@ -odoo.define('fleet_dashboard.dashboard_action', function(require) { - "use strict"; - var AbstractAction = require('web.AbstractAction'); - var core = require('web.core'); - var QWeb = core.qweb; - var ajax = require('web.ajax'); - var FleetDashBoard = AbstractAction.extend({ - template: 'FleetDashBoard', - events: { - 'click #fleet_manufacturers': '_onClickManufacturers', - 'click #fleet_models': '_onClickModels', - 'click #fleet_vehicles': '_onClickVehicles', - 'click #fleet_contracts': '_onClickContracts', - 'click #fleet_odometer': '_onClickOdoMeter', - 'click #fleet_services': '_onClickServices', - 'change #driver_selection': '_onchangeFilter', - 'change #vehicle_selection': '_onchangeFilter', - 'change #date_filter': '_onchangeFilter', - 'change #manufacturers_selection': '_onchangeFilter', - }, - /** - * Getting data after filtration - */ - _onchangeFilter: function() { - var self = this; - ajax.jsonRpc('/fleet_dashboard/filter_data', 'call', {'data': { - 'date': self.$el.find('#date_filter').val(), - 'vehicle': self.$el.find('#vehicle_selection').val(), - 'driver': self.$el.find('#driver_selection').val(), - 'manufacturer': self.$el.find('#manufacturers_selection').val() - }}).then(function(result) { - self.admin_odometer_list = result[3] - self.admin_fleet_cost_list = result[4] - self.admin_recurring_list = result[5] - self.fleet_vehicle_list = result[6] - self.fleet_model_list = result[7] - self.fleet_manufacture_list = result[8] - self.$el.find('#odometer_value').html(result[0]); - self.$el.find('#odometer_value2').html(result[0]); - self.$el.find('#service_value').html(result[1]); - self.$el.find('#service_value2').html(result[1]); - self.$el.find('#recurring_value').html(result[2]); - self.$el.find('#recurring_value2').html(result[2]); - }) - }, - /** - * Checking whether the filter is applied or not - */ - _onClickManufacturers: function() { - if (this.flag == 0) { - this.OpenVehicleModelBrand(this.manufacture_list) - } else { - this.OpenVehicleModelBrand(this.fleet_manufacture_list) - } - }, - /** - * Opening "fleet.vehicle.model.brand" kanban view - */ - OpenVehicleModelBrand: function(domain){ - this.do_action({ - type: 'ir.actions.act_window', - name: 'Manufacturers', - res_model: 'fleet.vehicle.model.brand', - domain: [["id", "in", domain]], - view_mode: 'kanban', - views: [[false, 'kanban'],[false, 'form']], - target: 'self' - }); - }, - /** - * Checking whether the filter is applied or not - */ - _onClickModels: function() { - if (this.flag == 0){ - this.OpenVehicleModel(this.model_list) - } else { - this.OpenVehicleModel(this.fleet_model_list) - } - }, - /** - * Opening "fleet.vehicle.model" kanban view - */ - OpenVehicleModel: function(domain){ - this.do_action({ - type: 'ir.actions.act_window', - name: 'Models', - res_model: 'fleet.vehicle.model', - domain: [["id", "in", domain]], - view_mode: 'kanban', - views: [[false, 'kanban'],[false, 'form']], - target: 'self' - }); - }, - /** - * Opening "fleet.vehicle" kanban view - */ - _onClickVehicles: function() { - if (this.flag == 1) { - this.do_action({ - type: 'ir.actions.act_window', - name: 'Vehicles', - res_model: 'fleet.vehicle', - view_mode: 'kanban', - views: [[false, 'kanban'],[false, 'form']], - domain: [["id", "in", this.fleet_vehicle_list]], - target: 'self' - }); - } - }, - /** - * Opening "fleet.vehicle.log.contract" list view - */ - _onClickContracts: function() { - if (this.flag == 1) { - this.do_action({ - type: 'ir.actions.act_window', - name: 'Vehicles', - res_model: 'fleet.vehicle.log.contract', - domain: [["id", "in", this.admin_recurring_list]], - view_mode: 'kanban', - views: [[false, 'list'],[false, 'form']], - target: 'self' - }); - } - }, - /** - * Opening "fleet.vehicle.log.services" list view - */ - _onClickServices: function() { - if (this.flag == 1) { - this.do_action({ - type: 'ir.actions.act_window', - name: 'Services', - res_model: 'fleet.vehicle.log.services', - domain: [["id", "in", this.admin_fleet_cost_list]], - view_mode: 'list', - views: [[false, 'list'],[false, 'form']], - target: 'self' - }); - } - }, - /** - * Opening "fleet.vehicle.odometer" list view - */ - _onClickOdoMeter: function() { - if (this.flag == 1) { - this.do_action({ - type: 'ir.actions.act_window', - name: 'Odometers', - res_model: 'fleet.vehicle.odometer', - domain: [["id", "in", this.admin_odometer_list]], - view_mode: 'list', - views: [[false, 'list'],[false, 'form']], - target: 'self' - }); - } - }, - init: function(parent, context) { - this._super(parent, context); - this.dashboards_templates = ['FleetDashBoard']; - }, - willStart: function() { - var self = this; - return $.when(this._super()).then(function() { - return self.fetch_data(); - }); - }, - start: function() { - var self = this; - this.set("title", 'Dashboard'); - return this._super().then(function() { - self.render_filter(); - self.render_dashboards(); - }); - }, - /** - * Appending values to the template - */ - render_dashboards: function() { - var self = this; - _.each(this.dashboards_templates, function(template) { - self.$('.fleet_oh_dashboards').append(QWeb.render(template, { - widget: self - })); - }); - }, - /** - * Getting data to selection field - */ - render_filter: function() { - var self = this; - ajax.rpc('/fleet/filter').then(function(data) { - var drivers = data[0] - var vehicles = data[1] - var manufacturers = data[2] - for (var i = 0; i < vehicles.length; i++) { - self.$el.find('#vehicle_selection').append(""); - } - for (var i = 0; i < drivers.length; i++) { - self.$el.find('#driver_selection').append(""); - } - for (var i = 0; i " + manufacturers[i].name + ""); - } - }) - }, - /** - * Getting data to the window - */ - fetch_data: function() { - var self = this; - var def1 = this._rpc({ - model: 'fleet.vehicle', - method: 'get_tiles_data' - }).then(function(result) { - self.total_odometer = result['total_odometer'] - self.service_cost = result['service_cost'] - self.recurring_cost = result['recurring_cost'] - self.all_vehicles = result['all_vehicles'] - self.fleet_state = result['fleet_state'] - self.flag = result['flag'] - if (self.flag == 0) { - self.manufacture_list = result['manufacture_list'] - self.model_list = result['model_list'] - } else { - self.admin_odometer_list = result['admin_odometer_list'] - self.admin_fleet_cost_list = result['admin_fleet_cost_list'] - self.admin_recurring_list = result['admin_recurring_list'] - self.fleet_vehicle_list = result['fleet_vehicle_list'] - self.fleet_model_list = result['fleet_model_list'] - self.fleet_manufacture_list = result['fleet_manufacture_list'] - } - google.charts.load('current', { - 'packages': ['corechart'] - }); - google.charts.setOnLoadCallback(drawChart); - //Function for drawing chart - function drawChart() { - try { - var data = google.visualization.arrayToDataTable(result['odometer_value_list']); - var options = { - title: 'Odometer Reading Monthly Wise', - hAxis: {title: 'Month'}, - vAxis: {title: 'Odometer Values'}, - legend: 'none', - pointsVisible: true, - }; - var line_chart = new google.visualization.LineChart(self.el.querySelector('#lineChart')); - line_chart.draw(data, options); - var service_data = google.visualization.arrayToDataTable(result['service_type']); - var service_options = { - title: 'Service Types', - pieHole: 0.4 - }; - var service_chart = new google.visualization.PieChart(self.el.querySelector('#service_Chart')); - service_chart.draw(service_data, service_options); - var data = google.visualization.arrayToDataTable(result['service_cost_list']); - var options = { - title: ' Service Cost Last Six Months', - vAxis: { - gridlines: {color: 'transparent'}, - title: 'Service Cost' - }, - legend: 'none', - }; - var chart = new google.visualization.ColumnChart(self.el.querySelector('#barChart')); - chart.draw(data, options); - } catch (e) { - self.fetch_data(); - } - } - }); - return $.when(def1); - }, - }) - core.action_registry.add('fleet_dashboard_tags', FleetDashBoard); - return FleetDashBoard; -}) diff --git a/fleet_dashboard/static/src/xml/fleet_dashboard_templates.xml b/fleet_dashboard/static/src/xml/fleet_dashboard_templates.xml deleted file mode 100755 index fa660fb9c..000000000 --- a/fleet_dashboard/static/src/xml/fleet_dashboard_templates.xml +++ /dev/null @@ -1,348 +0,0 @@ - - \ No newline at end of file diff --git a/fleet_dashboard/views/fleet_dashboard_menus.xml b/fleet_dashboard/views/fleet_dashboard_menus.xml deleted file mode 100755 index 7d51fb3d0..000000000 --- a/fleet_dashboard/views/fleet_dashboard_menus.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Dashboard - fleet_dashboard_tags - - - -