@ -0,0 +1,46 @@ |
|||
.. 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). |
|||
<https://www.gnu.org/licenses/agpl-3.0-standalone.html>`__ |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
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 <https://cybrosys.com/>`__ |
|||
|
|||
Further information |
|||
=================== |
|||
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
################################################################################ |
|||
from . import controllers |
|||
from . import models |
@ -0,0 +1,50 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
################################################################################ |
|||
{ |
|||
'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, |
|||
} |
@ -0,0 +1,21 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
################################################################################ |
|||
from . import fleet_dashboard |
@ -0,0 +1,148 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
################################################################################ |
|||
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)] |
@ -0,0 +1,6 @@ |
|||
## Module <fleet_dashboard> |
|||
|
|||
#### 02.11.2023 |
|||
#### Version 16.0.1.0.0 |
|||
##### ADD |
|||
- Initial Commit for Fleet Dashboard |
@ -0,0 +1,21 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
################################################################################ |
|||
from . import fleet_vehicle |
@ -0,0 +1,252 @@ |
|||
# -*- coding: utf-8 -*- |
|||
################################################################################ |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# 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 <http://www.gnu.org/licenses/>. |
|||
################################################################################ |
|||
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 |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 589 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 967 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 175 KiB |
After Width: | Height: | Size: 170 KiB |
After Width: | Height: | Size: 164 KiB |
After Width: | Height: | Size: 157 KiB |
After Width: | Height: | Size: 292 KiB |
After Width: | Height: | Size: 1.9 MiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 28 KiB |
@ -0,0 +1,637 @@ |
|||
<div style="background-color: #714B67; height: 810px; width: 100%; padding: 15px; position: relative;"> |
|||
<!-- TITLE BAR --> |
|||
<div class="d-flex align-items-center justify-content-between" |
|||
style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;"> |
|||
<img src="assets/misc/cybrosys-logo.png" width="42" height="42" style="width: 42px; height: 42px;" /> |
|||
<div> |
|||
<div |
|||
style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
|||
class="mr-2"> |
|||
<i class="fa fa-check mr-1"></i>Enterprise |
|||
</div> |
|||
<div |
|||
style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
|||
class="mr-2"> |
|||
<i class="fa fa-check mr-1"></i>Community |
|||
</div> |
|||
<div |
|||
style="color: #017E84; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" |
|||
class="mr-2"> |
|||
<i class="fa fa-check mr-1"></i>Odoo.sh |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF TITLE BAR --> |
|||
<div class="container"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 col-md-12 col-lg-12"> |
|||
<!-- APP HERO --> |
|||
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;"> |
|||
Fleet Dashboard |
|||
</h1> |
|||
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">In this dashboard you can get all the details about fleet module.</p> |
|||
<!-- END OF APP HERO --> |
|||
<img src="assets/screenshots/hero.gif" class="img-responsive" |
|||
style="width: 100%; margin-left: auto; margin-right: auto;"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- NAVIGATION SECTION --> |
|||
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/compass.png" /> |
|||
</div> |
|||
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Explore This |
|||
Module</h2> |
|||
</div> |
|||
<div class="row my-4" style="font-family: 'Montserrat', sans-serif;"> |
|||
<div class="col-sm-12 col-md-6 my-3"> |
|||
<a href="#overview"> |
|||
<div class="d-flex justify-content-between align-items-center" |
|||
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
|||
<div> |
|||
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span> |
|||
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">Learn |
|||
more about this |
|||
module</span> |
|||
</div> |
|||
<img src="assets/misc/right-arrow.png" width="36" height="36" /> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 col-md-6 my-3"> |
|||
<a href="#features"> |
|||
<div class="d-flex justify-content-between align-items-center" |
|||
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
|||
<div> |
|||
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span> |
|||
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View |
|||
features of this |
|||
module</span> |
|||
</div> |
|||
<img src="assets/misc/right-arrow.png" width="36" height="36" /> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 col-md-6 my-3"> |
|||
<a href="#screenshots"> |
|||
<div class="d-flex justify-content-between align-items-center" |
|||
style="background-color: #f5f5f5; padding: 30px; width: 100%;"> |
|||
<div> |
|||
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span> |
|||
<span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View |
|||
screenshots for this |
|||
module</span> |
|||
</div> |
|||
<img src="assets/misc/right-arrow.png" width="36" height="36" /> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<!-- END OF NAVIGATION SECTION --> |
|||
|
|||
<!-- OVERVIEW SECTION --> |
|||
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="overview"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/pie-chart.png" /> |
|||
</div> |
|||
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Overview |
|||
</h2> |
|||
</div> |
|||
<div class="row" style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
|||
<div class="col-sm-12 py-4"> |
|||
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. |
|||
</div> |
|||
|
|||
</div> |
|||
<!-- END OF OVERVIEW SECTION --> |
|||
|
|||
<!-- FEATURES SECTION --> |
|||
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="features"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/features.png" /> |
|||
</div> |
|||
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Features |
|||
</h2> |
|||
</div> |
|||
<div class="row" style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> |
|||
<div class="col-sm-12 col-md-6"> |
|||
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">This module provides the detailed graph view of Odometer</span> |
|||
</div> |
|||
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">The module provides the view of the service cost in last six months.</span> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-12 col-md-6"> |
|||
|
|||
<div class="d-flex align-items-center" style="margin-top: 30px; margin-bottom: 30px"> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Can see Drivers and Contracts information.</span> |
|||
</div> |
|||
<img src="assets/misc/check-box.png" class="mr-2" /> |
|||
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">User can get details about Vehicles, Manufacturers, Models and Vehicle Status</span> |
|||
</div> |
|||
</div> |
|||
<!-- END OF FEATURES SECTION --> |
|||
|
|||
<!-- SCREENSHOTS SECTION --> |
|||
<div class="d-flex align-items-center" style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="screenshots"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/pictures.png" /> |
|||
</div> |
|||
<h2 class="mt-2" style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">Screenshots |
|||
</h2> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12"> |
|||
|
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Dynamic And Clickable Dashboard Tiles |
|||
|
|||
</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
|||
Users can click the tiles, which display a detailed view of the corresponding tiles. |
|||
</p> |
|||
<img src="assets/screenshots/Screenshot.jpg" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Dynamic Filters |
|||
|
|||
</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;"> |
|||
Users can apply the filters based on their requirements. |
|||
</p> |
|||
<img src="assets/screenshots/Screenshot5.png" class="img-thumbnail"> |
|||
</div> |
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Different Types of Graphs |
|||
</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">The Fleet Dashboard has different types of graphs that will give you a complete analysis of the Fleet Module. |
|||
</p> |
|||
<img src="assets/screenshots/Screenshot2.jpg" class="img-thumbnail"> |
|||
</div> |
|||
|
|||
<div style="display: block; margin: 30px auto;"> |
|||
<img src="assets/screenshots/Screenshot3.jpg" class="img-thumbnail"> |
|||
</div> |
|||
|
|||
<div style="display: block; margin: 30px auto;"> |
|||
<h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Vehicle Table |
|||
|
|||
</h3> |
|||
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">User can see all vehicles and its current status. |
|||
</p> |
|||
<img src="assets/screenshots/Screenshot4.jpg" class="img-thumbnail"> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<!-- END OF SCREENSHOTS SECTION --> |
|||
|
|||
<!-- RELATED PRODUCTS --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/categories.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Related |
|||
Products |
|||
</h2> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12"> |
|||
<div id="demo1" class="row carousel slide" data-ride="carousel"> |
|||
<!-- The slideshow --> |
|||
<div class="carousel-inner" style="padding: 30px;"> |
|||
<div class="carousel-item" style="min-height: 198.656px;"> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/website_repeat_sale/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/l1.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/woo_commerce/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/l2.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/shopify_odoo_connector/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/l3.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div class="carousel-item active" |
|||
style="min-height: 198.656px;"> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/odoo_dynamic_dashboard/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/l4.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/custom_gantt_view/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/l5.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" |
|||
style="float:left"> |
|||
<a href="https://apps.odoo.com/apps/modules/16.0/pos_credit_limit/" |
|||
target="_blank"> |
|||
<div style="border-radius:10px"> |
|||
<img class="img img-responsive center-block" |
|||
style="border-radius: 0px;" |
|||
src="assets/modules/l6.png"> |
|||
</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- Left and right controls --> |
|||
<a class="carousel-control-prev" href="#demo1" data-slide="prev" |
|||
style="width:35px; color:#000"> <span |
|||
class="carousel-control-prev-icon"><i |
|||
class="fa fa-chevron-left" |
|||
style="font-size:24px"></i></span> |
|||
</a> <a class="carousel-control-next" href="#demo1" |
|||
data-slide="next" style="width:35px; color:#000"> |
|||
<span class="carousel-control-next-icon"><i |
|||
class="fa fa-chevron-right" |
|||
style="font-size:24px"></i></span> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF RELATED PRODUCTS --> |
|||
|
|||
<!-- OUR SERVICES --> |
|||
|
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/star.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Our Services |
|||
</h2> |
|||
</div> |
|||
|
|||
<div class="container my-5"> |
|||
<div class="row"> |
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/cogs.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Customization</h6> |
|||
</div> |
|||
|
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/wrench.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Implementation</h6> |
|||
</div> |
|||
|
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/lifebuoy.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Support</h6> |
|||
</div> |
|||
|
|||
|
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/user.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Hire |
|||
Odoo |
|||
Developer</h6> |
|||
</div> |
|||
|
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/puzzle.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Integration</h6> |
|||
</div> |
|||
|
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/update.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Migration</h6> |
|||
</div> |
|||
|
|||
|
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/consultation.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Consultancy</h6> |
|||
</div> |
|||
|
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/training.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Implementation</h6> |
|||
</div> |
|||
|
|||
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> |
|||
<div class="d-flex justify-content-center align-items-center mx-3 my-3" |
|||
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;"> |
|||
<img src="assets/icons/license.png" class="img-responsive" |
|||
height="48px" width="48px"> |
|||
</div> |
|||
<h6 class="text-center" |
|||
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> |
|||
Odoo |
|||
Licensing Consultancy</h6> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<!-- END OF OUR SERVICES --> |
|||
|
|||
<!-- OUR INDUSTRIES --> |
|||
|
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/corporate.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Our |
|||
Industries |
|||
</h2> |
|||
</div> |
|||
|
|||
<div class="container my-5"> |
|||
<div class="row"> |
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/trading-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Trading |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Easily procure |
|||
and |
|||
sell your products</p> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/pos-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
POS |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Easy |
|||
configuration |
|||
and convivial experience</p> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/education-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Education |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
A platform for |
|||
educational management</p> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/manufacturing-black.png" |
|||
class="img-responsive mb-3" height="48px" |
|||
width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Manufacturing |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Plan, track and |
|||
schedule your operations</p> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/ecom-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
E-commerce & Website |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Mobile |
|||
friendly, |
|||
awe-inspiring product pages</p> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/service-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Service Management |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Keep track of |
|||
services and invoice</p> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/restaurant-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Restaurant |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
Run your bar or |
|||
restaurant methodically</p> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="col-lg-3"> |
|||
<div class="my-4 d-flex flex-column justify-content-center" |
|||
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> |
|||
<img src="assets/icons/hotel-black.png" |
|||
class="img-responsive mb-3" height="48px" width="48px"> |
|||
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> |
|||
Hotel Management |
|||
</h5> |
|||
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> |
|||
An |
|||
all-inclusive |
|||
hotel management application</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- END OF OUR INDUSTRIES --> |
|||
|
|||
<!-- SUPPORT --> |
|||
<div class="d-flex align-items-center" |
|||
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> |
|||
<div class="d-flex justify-content-center align-items-center mr-2" |
|||
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> |
|||
<img src="assets/misc/customer-support.png"/> |
|||
</div> |
|||
<h2 class="mt-2" |
|||
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> |
|||
Support |
|||
</h2> |
|||
</div> |
|||
<div class="container mt-5"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 col-md-6"> |
|||
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> |
|||
<div class="mr-4" |
|||
style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> |
|||
<img src="assets/misc/support.png" height="48" width="48" |
|||
style="width: 42px; height: 42px;"/> |
|||
</div> |
|||
<div> |
|||
<h4>Need Help?</h4> |
|||
<p style="line-height: 100%;">Got questions or need help? |
|||
Get in touch.</p> |
|||
<a href="mailto:odoo@cybrosys.com"> |
|||
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> |
|||
odoo@cybrosys.com</p> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-12 col-md-6"> |
|||
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> |
|||
<div class="mr-4" |
|||
style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> |
|||
<img src="assets/misc/whatsapp.png" height="52" width="52" |
|||
style="width: 52px; height: 52px;"/> |
|||
</div> |
|||
<div> |
|||
<h4>WhatsApp</h4> |
|||
<p style="line-height: 100%;">Say hi to us on WhatsApp!</p> |
|||
<a href="https://api.whatsapp.com/send?phone=918606827707"> |
|||
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> |
|||
+91 86068 |
|||
27707</p> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-12 my-5 d-flex justify-content-center align-items-center"> |
|||
<img src="assets/misc/logo.png" width="144" height="31" |
|||
style="width:144px; height: 31px; margin-top: 40px;"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- END OF SUPPORT --> |
@ -0,0 +1,222 @@ |
|||
.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; |
|||
|
|||
} |
|||
} |
@ -0,0 +1,278 @@ |
|||
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("<option value=" + vehicles[i].id + " style='background-color:#827c93;'>" + vehicles[i].name + "</option>"); |
|||
} |
|||
for (var i = 0; i < drivers.length; i++) { |
|||
self.$el.find('#driver_selection').append("<option value=" + drivers[i].id + " style='background-color:#827c93;'>" + drivers[i].name + "</option>"); |
|||
} |
|||
for (var i = 0; i <manufacturers.length; i++) { |
|||
self.$el.find('#manufacturers_selection').append("<option value=" + manufacturers[i].id + " style='background-color:#827c93;'>" + manufacturers[i].name + "</option>"); |
|||
} |
|||
}) |
|||
}, |
|||
/** |
|||
* 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; |
|||
}) |
@ -0,0 +1,348 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<template> |
|||
<t t-name="FleetDashBoard"> |
|||
<!-- Dashboard Template --> |
|||
<div class="oh_dashboards" style="margin-top: 20px;"> |
|||
<div class="filter" style="display:flex;margin-right:56px;"> |
|||
<t t-if="widget.flag == 1"> |
|||
<div class="inner_select" style="display: flex;"> |
|||
<p style="margin-left: 20px;">Date Range :</p> |
|||
<p> |
|||
<select class="fleet_select" id="date_filter"> |
|||
<option value="null" |
|||
style='background-color:#827c93;'>With |
|||
Out Date |
|||
</option> |
|||
<option value="10" |
|||
style='background-color:#827c93;'>Last |
|||
10 days |
|||
</option> |
|||
<option value="30" |
|||
style='background-color:#827c93;'>Last |
|||
month |
|||
</option> |
|||
<option value="90" |
|||
style='background-color:#827c93;'>Last 3 |
|||
month |
|||
</option> |
|||
<option value="365" |
|||
style='background-color:#827c93;'>Last |
|||
Year |
|||
</option> |
|||
</select> |
|||
</p> |
|||
<p>Driver :</p> |
|||
<p> |
|||
<select class="fleet_select" id="driver_selection"> |
|||
<option value="null" |
|||
style='background-color:#827c93;'>All |
|||
Drivers |
|||
</option> |
|||
</select> |
|||
</p> |
|||
<p>Vehicle Model :</p> |
|||
<p> |
|||
<select class="fleet_select" id="vehicle_selection"> |
|||
<option value="null" |
|||
style='background-color:#827c93;'>All |
|||
Vehicle Model |
|||
</option> |
|||
</select> |
|||
</p> |
|||
<p>Vehicle Manufacturers :</p> |
|||
<p> |
|||
<select class="fleet_select" |
|||
id="manufacturers_selection"> |
|||
<option value="null" |
|||
style='background-color:#827c93;'>All |
|||
Manufacturers |
|||
</option> |
|||
</select> |
|||
</p> |
|||
</div> |
|||
</t> |
|||
</div> |
|||
<div class="row" style="padding:2%;"> |
|||
<div class="col-md-8 fleet_content"> |
|||
<div class="fleet_main"> |
|||
<div class="row"> |
|||
<div class="content_fleet_external col-md-4 fleet_other_info" |
|||
id="fleet_vehicles" style="width: 31.5%"> |
|||
<div class="row"> |
|||
<div class="col-md-3 align_center fleet_icon-div"> |
|||
<i class="fa fa-car" |
|||
style="margin-top:6vh"/> |
|||
</div> |
|||
<div class="col-md-9 content-div fleet_border-content" |
|||
style="border-color: transparent;"> |
|||
<div class="align_center"> |
|||
<h5 class="card-title" |
|||
style="margin-top:5vh">VEHICLES |
|||
</h5> |
|||
<p class="card-text align_center" |
|||
id="total_vehicles">Total |
|||
Vehicles |
|||
<t t-esc="widget.all_vehicles"/> |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="content_fleet_external col-md-4 fleet_other_info" |
|||
id="fleet_manufacturers" style="width: 31.5%;"> |
|||
<div class="row"> |
|||
<div class="col-md-3 align_center fleet_icon-div"> |
|||
<i class="fa fa-car" |
|||
style="margin-top:6vh"/> |
|||
</div> |
|||
<div class="col-md-9 content-div fleet_border-content" |
|||
style="border-color:transparent;"> |
|||
<div class="align_center"> |
|||
<h5 class="card-title" |
|||
style="margin-top:6vh"> |
|||
MANUFACTURERS |
|||
</h5> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="content_fleet_external col-md-4 fleet_other_info" |
|||
id="fleet_models" style="width: 31.5%;"> |
|||
<div class="row"> |
|||
<div class="col-md-3 align_center fleet_icon-div"> |
|||
<i class="fa fa-car" |
|||
style="margin-top:6vh"/> |
|||
</div> |
|||
<div class="col-md-9 content-div fleet_border-content" |
|||
style="border-color:transparent;"> |
|||
<div class="align_center"> |
|||
<h5 class="card-title" |
|||
style="margin-top:6vh">MODELS |
|||
</h5> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="content_fleet_external col-md-4 fleet_content_main" |
|||
id="fleet_odometer" style="width: 31.5%;"> |
|||
<div class="row"> |
|||
<div class="col-md-3 align_center fleet_icon-content" |
|||
style="background-color:#71619E;"> |
|||
<i class="fa fa-tachometer"/> |
|||
</div> |
|||
<div class="col-md-9 content-div fleet_border-content" |
|||
style="border-color: transparent;"> |
|||
<div class="align_center"> |
|||
<h1 class="card-title" |
|||
style="margin-top:8vh">Odometer |
|||
</h1> |
|||
<p class="card-text align_center"> |
|||
Show All Odometer Value |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="content_fleet_external card col-md-8 mb-3 fleet_content_graph" |
|||
style="width: 64%;"> |
|||
<div class="row"> |
|||
<div class="card-body col-md-4 text-primary fleet_content_graph_inner"> |
|||
<img class="fleet_img_content" |
|||
src="https://img.freepik.com/free-icon/speedometer-icon_318-1920.jpg?w=2000"/> |
|||
</div> |
|||
<div class="col-md-4"> |
|||
<h2 class="card-title text-primary fleet_content_titles"> |
|||
Total Odometer value |
|||
</h2> |
|||
<h3 class="card-text align_center text-primary" |
|||
style="margin-left: -13px;" |
|||
id="odometer_value"> |
|||
<t t-esc="widget.total_odometer"/> |
|||
</h3> |
|||
</div> |
|||
<div class="col-md-4"> |
|||
<section class="fleet_container"> |
|||
<figure class="chart" |
|||
data-percent="75"> |
|||
<figcaption class="text-primary" |
|||
id="odometer_value2"> |
|||
<t t-esc="widget.total_odometer"/> |
|||
</figcaption> |
|||
<svg width="200" height="200"> |
|||
<circle class="outer" |
|||
cx="95" cy="95" |
|||
r="85" |
|||
transform="rotate(-90, 95, 95)" |
|||
style="stroke:#71619E;"/> |
|||
</svg> |
|||
</figure> |
|||
</section> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="content_fleet_external col-md-4 fleet_content_main" |
|||
id="fleet_services" style="width: 31.5%;"> |
|||
<div class="row"> |
|||
<div class="col-md-3 align_center fleet_icon-content" |
|||
style="background-color:#28A745;"> |
|||
<i class="fa fa-wrench"/> |
|||
</div> |
|||
<div class="col-md-9 content-div fleet_border-content" |
|||
style="border-color: transparent;"> |
|||
<div class="align_center"> |
|||
<h1 class="card-title" |
|||
style="margin-top:8vh">Service |
|||
Cost |
|||
</h1> |
|||
<p class="card-text align_center"> |
|||
Show All Service Cost |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="content_fleet_external card col-md-8 mb-3 fleet_content_graph" |
|||
style="width: 64%;"> |
|||
<div class="row"> |
|||
<div class="card-body col-md-4 text-success fleet_content_graph_inner"> |
|||
<img class="fleet_img_content" |
|||
src="https://www.transparentpng.com/thumb/tool/screwdriver-pliers-tool-png-transparent-5.png"/> |
|||
</div> |
|||
<div class="col-md-4"> |
|||
<h2 class="card-title text-success fleet_content_titles"> |
|||
Total Service Cost |
|||
</h2> |
|||
<h3 class="card-text align_center text-success" |
|||
id="service_value" |
|||
style="margin-left: -13px;"> |
|||
<t t-esc="widget.service_cost"/> |
|||
</h3> |
|||
</div> |
|||
<div class="col-md-4"> |
|||
<section class="fleet_container"> |
|||
<figure class="chart" |
|||
data-percent="75"> |
|||
<figcaption class="text-success" |
|||
id="service_value2"> |
|||
<t t-esc="widget.service_cost"/> |
|||
</figcaption> |
|||
<svg width="200" height="200"> |
|||
<circle class="outer" |
|||
cx="95" cy="95" |
|||
r="85" |
|||
transform="rotate(-90, 95, 95)" |
|||
style="stroke:#28A745;"/> |
|||
</svg> |
|||
</figure> |
|||
</section> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row"> |
|||
<div class="content_fleet_external col-md-4 fleet_content_main" |
|||
id="fleet_contracts" style="width: 31.5%;"> |
|||
<div class="row"> |
|||
<div class="col-md-3 align_center fleet_icon-content" |
|||
style="background-color:#DC3545;"> |
|||
<i class="fa fa-book"/> |
|||
</div> |
|||
<div class="col-md-9 content-div fleet_border-content" |
|||
style="border-color: transparent;"> |
|||
<div class="align_center"> |
|||
<h1 class="card-title" |
|||
style="margin-top:8vh">Recurring |
|||
Cost |
|||
</h1> |
|||
<p class="card-text align_center"> |
|||
Show All Contracts |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="content_fleet_external card col-md-8 mb-3 fleet_content_graph" |
|||
style="width: 64%;"> |
|||
<div class="row"> |
|||
<div class="card-body col-md-4 text-danger fleet_content_graph_inner"> |
|||
<img class="fleet_img_content" |
|||
src="https://cdn-icons-png.flaticon.com/512/5885/5885946.png"/> |
|||
</div> |
|||
<div class="col-md-4"> |
|||
<h2 class="card-title text-danger fleet_content_titles"> |
|||
Total Recurring Cost |
|||
</h2> |
|||
<h3 class="card-text align_center text-danger" |
|||
style="margin-left: -13px;" |
|||
id="recurring_value"> |
|||
<t t-esc="widget.recurring_cost"/> |
|||
</h3> |
|||
</div> |
|||
<div class="col-md-4"> |
|||
<section class="fleet_container"> |
|||
<figure class="chart" |
|||
data-percent="75"> |
|||
<figcaption |
|||
class="text-danger o_recurring_cost" |
|||
id="recurring_value2"> |
|||
<t t-esc="widget.recurring_cost"/> |
|||
</figcaption> |
|||
<svg width="200" height="200"> |
|||
<circle class="outer" |
|||
cx="95" cy="95" |
|||
r="85" |
|||
transform="rotate(-90, 95, 95)" |
|||
style="stroke:#DC3545;"/> |
|||
</svg> |
|||
</figure> |
|||
</section> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div id="lineChart" |
|||
style="width: 100%;max-width: 1215px;margin-left: 19px;height: 550px;margin-top: 15px;margin-bottom: 15px;" |
|||
class="card content_fleet_external"> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-4"> |
|||
<div id="service_Chart" |
|||
style="width:100%; max-width:600px; height:500px;margin-top:39px;margin-bottom:20px;" |
|||
class="card content_fleet_external"> |
|||
</div> |
|||
<div id="barChart" |
|||
style="width:100%; max-width:600px; height:500px;" |
|||
class="card content_fleet_external"> |
|||
</div> |
|||
<div style="width:100%; max-width:600px; height:389px;margin-top: 20px;" |
|||
class="card content_fleet_external"> |
|||
<h1 class="align_center card" |
|||
style="margin-top:30px; color:#0253e8;">Vehicle |
|||
Status |
|||
</h1> |
|||
<div class="table-responsive-md"> |
|||
<table id="table_status" style="width"> |
|||
<t t-foreach="widget.fleet_state" t-as="data"> |
|||
<tr> |
|||
<td> |
|||
<h4 t-esc="data['state']"/> |
|||
</td> |
|||
<td> |
|||
<h4 class="fleet-pill" |
|||
t-esc="data['number']"/> |
|||
</td> |
|||
</tr> |
|||
</t> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</t> |
|||
</template> |
@ -0,0 +1,13 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<odoo> |
|||
<!-- Adding action for the menu itme--> |
|||
<record id="fleet_dashboard_action" model="ir.actions.client"> |
|||
<field name="name">Dashboard</field> |
|||
<field name="tag">fleet_dashboard_tags</field> |
|||
</record> |
|||
<!-- Adding menu item to the fleet module--> |
|||
<menuitem name="Dashboard" id="fleet_vehicle_dashboard_action" |
|||
action="fleet_dashboard_action" |
|||
sequence="1" |
|||
parent="fleet.menu_root"/> |
|||
</odoo> |