Browse Source

[ADD] Initial Commit

pull/124/head
Niyas Raphy 6 years ago
parent
commit
31d8d44916
  1. 42
      employee_vehicle_request/README.rst
  2. 23
      employee_vehicle_request/__init__.py
  3. 46
      employee_vehicle_request/__manifest__.py
  4. 17
      employee_vehicle_request/data/data.xml
  5. 3
      employee_vehicle_request/models/__init__.py
  6. 157
      employee_vehicle_request/models/employee_fleet.py
  7. 7
      employee_vehicle_request/security/ir.model.access.csv
  8. 11
      employee_vehicle_request/security/security.xml
  9. BIN
      employee_vehicle_request/static/description/banner.jpg
  10. BIN
      employee_vehicle_request/static/description/cybro_logo.png
  11. BIN
      employee_vehicle_request/static/description/employee_vehicle_request-cybrosys-1.png
  12. BIN
      employee_vehicle_request/static/description/employee_vehicle_request-cybrosys-2.png
  13. BIN
      employee_vehicle_request/static/description/employee_vehicle_request-cybrosys-3.png
  14. BIN
      employee_vehicle_request/static/description/employee_vehicle_request-cybrosys-4.png
  15. BIN
      employee_vehicle_request/static/description/icon.png
  16. 399
      employee_vehicle_request/static/description/index.html
  17. BIN
      employee_vehicle_request/static/description/vehicle-request-cybrosys-1.png
  18. BIN
      employee_vehicle_request/static/description/vehicle-request-cybrosys-2.png
  19. BIN
      employee_vehicle_request/static/description/vehicle-request-cybrosys-3.png
  20. BIN
      employee_vehicle_request/static/description/vehicle-request-cybrosys-4.png
  21. 127
      employee_vehicle_request/views/employee_fleet_view.xml

42
employee_vehicle_request/README.rst

@ -0,0 +1,42 @@
Employee Vehicle Request v12
============================
* Manage Vehicle Requests From Employee
Depends
=======
[base] addon Odoo
[hr] addon Odoo
[fleet] addon Odoo
Tech
====
* [Python] - Models
* [XML] - Odoo views
Installation
============
- www.odoo.com/documentation/12.0/setup/install.html
- Install our custom addon
License
=======
GNU Affero General Public License
(http://www.gnu.org/licenses/agpl.html)
Bug Tracker
===========
Contact odoo@cybrosys.com
Authors
-------
* Developer: Nilmar Shereef @ Cybrosys
* Developer v11: Niyas Raphy @ Cybrosys
Maintainer
----------
This module is maintained by Cybrosys Technologies.
For support and more information, please visit https://www.cybrosys.com.

23
employee_vehicle_request/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
##############################################################################
from . import models

46
employee_vehicle_request/__manifest__.py

@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Employee Vehicle Request',
'version': '12.0.1.0.0',
'summary': """Manage Vehicle Requests From Employee""",
'description': """This module is used for manage vehicle requests from employee.
This module also checking the vehicle availability at the requested time slot.""",
'category': "Generic Modules/Human Resources",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'depends': ['base', 'hr', 'fleet'],
'data': [
'data/data.xml',
'security/security.xml',
'security/ir.model.access.csv',
'views/employee_fleet_view.xml',
],
'images': ['static/description/banner.jpg'],
'license': 'AGPL-3',
'demo': [],
'installable': True,
'auto_install': False,
'application': False,
}

17
employee_vehicle_request/data/data.xml

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="fleet.fleet_rule_vehicle_visibility_user" model="ir.rule">
<field name="name">User can only see his/her vehicle</field>
<field name="model_id" ref="fleet.model_fleet_vehicle"/>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_unlink" eval="False"/>
<field name="domain_force">[]</field>
</record>
</data>
</odoo>

3
employee_vehicle_request/models/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import employee_fleet

157
employee_vehicle_request/models/employee_fleet.py

@ -0,0 +1,157 @@
# -*- coding: utf-8 -*-
from datetime import datetime
from odoo import models, fields, api, _
from odoo.exceptions import Warning
class FleetReservedTime(models.Model):
_name = "fleet.reserved"
_description = "Reserved Time"
employee = fields.Many2one('hr.employee', string='Employee')
date_from = fields.Datetime(string='Reserved Date From')
date_to = fields.Datetime(string='Reserved Date To')
reserved_obj = fields.Many2one('fleet.vehicle')
class FleetVehicleInherit(models.Model):
_inherit = 'fleet.vehicle'
check_availability = fields.Boolean(default=True, copy=False)
reserved_time = fields.One2many('fleet.reserved', 'reserved_obj', String='Reserved Time', readonly=1,
ondelete='cascade')
class EmployeeFleet(models.Model):
_name = 'employee.fleet'
_description = 'Employee Vehicle Request'
_inherit = 'mail.thread'
@api.model
def create(self, vals):
vals['name'] = self.env['ir.sequence'].next_by_code('employee.fleet')
return super(EmployeeFleet, self).create(vals)
@api.multi
def send(self):
fleet_obj = self.env['fleet.vehicle'].search([])
check_availability = 0
for i in fleet_obj:
for each in i.reserved_time:
if each.date_from <= self.date_from <= each.date_to:
check_availability = 1
elif self.date_from < each.date_from:
if each.date_from <= self.date_to <= each.date_to:
check_availability = 1
elif self.date_to > each.date_to:
check_availability = 1
else:
check_availability = 0
else:
check_availability = 0
if check_availability == 0:
reserved_id = self.fleet.reserved_time.create({'employee': self.employee.id,
'date_from': self.date_from,
'date_to': self.date_to,
'reserved_obj': self.fleet.id,
})
self.write({'reserved_fleet_id': reserved_id.id})
self.state = 'waiting'
else:
raise Warning('Sorry This vehicle is already requested by another employee')
@api.multi
def approve(self):
self.fleet.fleet_status = True
self.state = 'confirm'
mail_content = _('Hi %s,<br>Your vehicle request for the reference %s is approved.') % \
(self.employee.name, self.name)
main_content = {
'subject': _('%s: Approved') % self.name,
'author_id': self.env.user.partner_id.id,
'body_html': mail_content,
'email_to': self.employee.work_email,
}
mail_id = self.env['mail.mail'].create(main_content)
mail_id.mail_message_id.body = mail_content
mail_id.send()
if self.employee.user_id:
mail_id.mail_message_id.write({'needaction_partner_ids': [(4, self.employee.user_id.partner_id.id)]})
mail_id.mail_message_id.write({'partner_ids': [(4, self.employee.user_id.partner_id.id)]})
@api.multi
def reject(self):
self.reserved_fleet_id.unlink()
self.state = 'reject'
mail_content = _('Hi %s,<br>Sorry, Your vehicle request for the reference %s is Rejected.') % \
(self.employee.name, self.name)
main_content = {
'subject': _('%s: Approved') % self.name,
'author_id': self.env.user.partner_id.id,
'body_html': mail_content,
'email_to': self.employee.work_email,
}
mail_id = self.env['mail.mail'].create(main_content)
mail_id.mail_message_id.body = mail_content
mail_id.send()
if self.employee.user_id:
mail_id.mail_message_id.write({'needaction_partner_ids': [(4, self.employee.user_id.partner_id.id)]})
mail_id.mail_message_id.write({'partner_ids': [(4, self.employee.user_id.partner_id.id)]})
@api.multi
def cancel(self):
if self.reserved_fleet_id:
self.reserved_fleet_id.unlink()
self.state = 'cancel'
@api.multi
def returned(self):
self.reserved_fleet_id.unlink()
self.returned_date = fields.datetime.now()
self.state = 'return'
@api.constrains('date_rom', 'date_to')
def onchange_date_to(self):
for each in self:
if each.date_from > each.date_to:
raise Warning('Date To must be greater than Date From')
@api.onchange('date_from', 'date_to')
def check_availability(self):
self.fleet = ''
fleet_obj = self.env['fleet.vehicle'].search([])
for i in fleet_obj:
for each in i.reserved_time:
if each.date_from <= self.date_from <= each.date_to:
i.write({'check_availability': False})
elif self.date_from < each.date_from:
if each.date_from <= self.date_to <= each.date_to:
i.write({'check_availability': False})
elif self.date_to > each.date_to:
i.write({'check_availability': False})
else:
i.write({'check_availability': True})
else:
i.write({'check_availability': True})
reserved_fleet_id = fields.Many2one('fleet.reserved', invisible=1, copy=False)
name = fields.Char(string='Request Number', copy=False)
employee = fields.Many2one('hr.employee', string='Employee', required=1, readonly=True,
states={'draft': [('readonly', False)]})
req_date = fields.Date(string='Requested Date', default=fields.Date.context_today, required=1, readonly=True,
states={'draft': [('readonly', False)]}, help="Requested Date")
fleet = fields.Many2one('fleet.vehicle', string='Vehicle', required=1, readonly=True,
states={'draft': [('readonly', False)]})
date_from = fields.Datetime(string='From', required=1, readonly=True,
states={'draft': [('readonly', False)]})
date_to = fields.Datetime(string='To', required=1, readonly=True,
states={'draft': [('readonly', False)]})
returned_date = fields.Datetime(string='Returned Date', readonly=1)
purpose = fields.Text(string='Purpose', required=1, readonly=True,
states={'draft': [('readonly', False)]}, help="Purpose")
state = fields.Selection([('draft', 'Draft'), ('waiting', 'Waiting for Approval'), ('cancel', 'Cancel'),
('confirm', 'Approved'), ('reject', 'Rejected'), ('return', 'Returned')],
string="State", default="draft")

7
employee_vehicle_request/security/ir.model.access.csv

@ -0,0 +1,7 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_fleet_reserved_employee,access.fleet.reserved.employee,model_fleet_reserved,base.group_user,1,1,1,0
access_fleet_reserved_hr,access.fleet.reserved.hr,model_fleet_reserved,hr.group_hr_manager,1,1,1,1
access_fleet_reserved_hr_user,access.fleet.reserved.hr.user,model_fleet_reserved,hr.group_hr_user,1,1,1,0
access_employee_fleet_employee,access.employee.fleet.employee,model_employee_fleet,base.group_user,1,1,1,0
access_employee_fleet_hr,access.employee.fleet.hr,model_employee_fleet,hr.group_hr_manager,1,1,1,1
access_employee_fleet_hr_user,access.employee.fleet.hr.user,model_employee_fleet,hr.group_hr_user,1,1,1,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_fleet_reserved_employee access.fleet.reserved.employee model_fleet_reserved base.group_user 1 1 1 0
3 access_fleet_reserved_hr access.fleet.reserved.hr model_fleet_reserved hr.group_hr_manager 1 1 1 1
4 access_fleet_reserved_hr_user access.fleet.reserved.hr.user model_fleet_reserved hr.group_hr_user 1 1 1 0
5 access_employee_fleet_employee access.employee.fleet.employee model_employee_fleet base.group_user 1 1 1 0
6 access_employee_fleet_hr access.employee.fleet.hr model_employee_fleet hr.group_hr_manager 1 1 1 1
7 access_employee_fleet_hr_user access.employee.fleet.hr.user model_employee_fleet hr.group_hr_user 1 1 1 0

11
employee_vehicle_request/security/security.xml

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record model="res.groups" id="base.group_user">
<field name="implied_ids" eval="[(4, ref('fleet.fleet_group_user'))]"/>
</record>
<record model="res.groups" id="hr.group_hr_manager">
<field name="implied_ids" eval="[(4, ref('fleet.fleet_group_manager'))]"/>
</record>
</data>
</odoo>

BIN
employee_vehicle_request/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

BIN
employee_vehicle_request/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
employee_vehicle_request/static/description/employee_vehicle_request-cybrosys-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

BIN
employee_vehicle_request/static/description/employee_vehicle_request-cybrosys-2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

BIN
employee_vehicle_request/static/description/employee_vehicle_request-cybrosys-3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
employee_vehicle_request/static/description/employee_vehicle_request-cybrosys-4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
employee_vehicle_request/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

399
employee_vehicle_request/static/description/index.html

@ -0,0 +1,399 @@
<section class="oe_container" style="background-image:url(https://www.cybrosys.com/images/odoo-index-header-banner.png);background-repeat:no-repeat;background-size:100%;padding: 4% 0% 2% 15%;background-position-y: -107px;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="font-size: 35px;color: #fff;font-weight: 900;text-transform: uppercase;text-align: left;margin: 0;margin-bottom: 16px;">
Employee Vehicle Request
</h2>
<h3 class="oe_slogan" style="font-size: 25px;color: #fff;font-weight: 600;text-align: left;opacity: 1;margin: 0 !important;">
This Module Helps You To Manage Vehicle Requests From Employee
</h3>
<h5 class="oe_slogan" style="text-align: left;background: #fff;width: 293px;padding: 10px;color: #080808 !important;opacity: 1 !important;font-weight: 600;font-size: 20px;">
<a style="color: #080808 !important;" href="https://www.cybrosys.com" target="_blank">Cybrosys Technologies</a>
</h5>
<a style="color: #080808 !important;" href="https://www.cybrosys.com" target="_blank">
<div style="width: 215px;margin-left: 57%;text-align: center;background: #ffffff;height: 215px;border-radius: 100%;display: flex;justify-content: center;align-items: center;box-shadow: 0 0 12px 4px #00000059;">
<img src="https://www.cybrosys.com/images/cybro-logo-oca.png" alt="cybrosys technologies" style="width: 180px;"/>
</div>
</a>
</div>
</section>
<section class="oe_container" style="padding: 1% 0% 3% 15%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Overview
</h2>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
Employee can request available vehicle for a time period.
He should mention the time period and purpose. Then he can send this request to hr manager. Here also
module checking the availability of vehicles
</h3>
</div>
</section>
<section class="oe_container" style="background-image:url(https://www.cybrosys.com/images/odoo-index-banner.png); background-repeat:no-repeat; background-size:cover;padding: 10% 0% 25% 15%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Features
</h2>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Employee can request for any vehicle
</h3>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Checking availability of vehicles
</h3>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Validation for send request
</h3>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Validation for requested dates
</h3>
<h3 class="oe_slogan" style="text-align: left;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 18px;">
<i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Advanced search view
</h3>
</div>
</section>
<section class="oe_container" style="padding: 3% 0% 0% 15%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Screenshots
</h2>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div>
<i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Here any employee can request available vehicle for a time period.
He should mention the time period and purpose. Then he can send this request to hr manager. Here also
module checking the availability of vehicle
</div>
</h3>
<div class="oe_row oe_spaced">
<img src="vehicle-request-cybrosys-1.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div>
<i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Here Hr Manager can approve the vehicle request. Or she can refuse the request. Also Employee
can cancel this request from this stage before approval or rejection.
</div>
</h3>
<div class="oe_row oe_spaced">
<img src="vehicle-request-cybrosys-2.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div><i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Validation Messages
</div>
</h3>
<div class="oe_row oe_spaced">
<img src="vehicle-request-cybrosys-3.png" alt="" style="width: 95%;"/>
</div>
<h3 class="oe_slogan" style="text-align: left;padding: 5% 0% 0% 0%;font-size: 16px;width: 90%;margin: 0;margin-top: 14px;color: #000 !important;opacity: 1 !important;line-height: 24px;">
<div><i class="fa fa-check" aria-hidden="true" style="color: #cd2d47;font-size: 15px;"></i>
Requested Period Validation
</div>
</h3>
<div class="oe_row oe_spaced">
<img src="vehicle-request-cybrosys-4.png" alt="" style="width: 95%;"/>
</div>
</div>
</section>
<section class="oe_container" style="padding: 7px 0% 0% 3%;">
<div class="oe_row oe_spaced">
<a style="color: #080808 !important;" href="https://apps.odoo.com/apps/modules/browse?search=cybrosys" target="_blank"><img src="https://www.cybrosys.com/images/view-more-apps.jpg" alt="cybrosys technologies" style="width: 100%;margin-bottom: 50px;"/></a>
</div>
</section>
<section class="oe_container" style="padding: 1% 0% 0% 3%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Our Services
</h2>
<div style="display:flex;padding-top: 20px;justify-content: space-between;">
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-customization.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank">
Odoo Customization
</a>
</h3>
</div>
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/odoo-erp-implementation/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-erp-implementation.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-erp-implementation/" target="_blank">
Odoo Implementation </a>
</h3>
</div>
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/odoo-erp-integration/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-erp-integration.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-erp-integration/" target="_blank">
Odoo Integration
</a>
</h3>
</div>
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/odoo-erp-support/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-erp-support.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/odoo-erp-support/" target="_blank">
Odoo Support</a>
</h3>
</div>
<div style="flex-basis: 18%;">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;">
<a href="https://www.cybrosys.com/hire-odoo-developer/" target="_blank">
<img src="https://www.cybrosys.com/images/hire-odoo-developer.png" style="width: 100%;border-radius: 100%;"/>
</a>
</div>
<h3 class="oe_slogan" style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="https://www.cybrosys.com/hire-odoo-developer/" target="_blank">
Hire Odoo Developers</a>
</h3>
</a>
</div>
</div>
</div>
</section>
<section class="oe_container" style="padding: 1% 0% 0% 3%;">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="text-align: left;font-size: 28px;font-weight: 600;margin: 0px !important;">
Our Industries
</h2>
<div style="display:flex;justify-content: space-between;flex-wrap:wrap;">
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/best-trading-erp/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-1.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/best-trading-erp/" target="_blank">
Trading
</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Easily procure and sell your products.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/manufacturing-erp-software/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-2.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/manufacturing-erp-software/" target="_blank">
Manufacturing</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Plan, track and schedule your operations.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/restaurant-management/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-3.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/restaurant-management/" target="_blank">
Restaurant</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Run your bar or restaurant methodical.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/pos/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-4.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/pos/" target="_blank">
POS</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Easy configuring and convivial selling.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/ecommerce-website/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-5.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 0px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/ecommerce-website/" target="_blank">
E-commerce & Website</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Mobile friendly, awe-inspiring product pages.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/hotel-management-erp/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-6.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/hotel-management-erp/" target="_blank">
Hotel Management</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
An all-inclusive hotel management application.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/education-erp-software/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-7.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/education-erp-software/" target="_blank">
Education</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
A Collaborative platform for educational management.
</h3>
</div>
</div>
<div style="flex-basis: 32%;padding-top: 20px;">
<div style="width:30%; float:left;">
<div style="width:75px;height:75px;background:#CE2D48; border-radius:100%;float: left;text-align: left;">
<a href="https://www.cybrosys.com/odoo/industries/service-management/" target="_blank">
<img src="https://www.cybrosys.com/images/odoo-index-industry-8.png" alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a>
</div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan" style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="https://www.cybrosys.com/odoo/industries/service-management/" target="_blank">
Service Management</a>
</h3>
<h3 class="oe_slogan" style=" text-align: left;font-size: 13px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;">
Keep track of services and invoice accordingly.
</h3>
</div>
</div>
</div>
</div>
</section>
<section class="oe_container" style="background-image:url(https://www.cybrosys.com/images/odoo-index-footer-bg.png); background-repeat:no-repeat; background-size:100%;padding: 13% 0% 6% 0%;">
<div class="oe_slogan" style="margin-top:10px !important;margin-bottom: 0px;">
<div>
<a style="color: #5c5c5c !important;border-radius: 0;background: none;border: none;background: #fff;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62, 57, 107, 0.05);border-radius: 30px;font-size: 12px;padding: 9px 26px;margin-right: 9px;width: 200px;text-transform: capitalize;" class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" href="mailto:odoo@cybrosys.com"><i class="fa fa-envelope"></i> Email us </a>
<a style="color: #5c5c5c !important;border-radius: 0;background: none;border: none;background: #fff;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62, 57, 107, 0.05);border-radius: 30px;font-size: 12px;padding: 9px 26px;margin-right: 9px;width: 200px;text-transform: capitalize;" class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com/contact/"><i class="fa fa-phone"></i> Contact Us </a>
<a style="color: #5c5c5c !important;border-radius: 0;background: none;border: none;background: #fff;box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62, 57, 107, 0.05);border-radius: 30px;font-size: 12px;padding: 9px 26px;margin-right: 9px;width: 200px;text-transform: capitalize;" class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com/contact/"><i class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="https://www.cybrosys.com/images/logo.png" style="width: 190px; margin-bottom: 25px;margin-top: 30px;" class="center-block">
<div>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px; ;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a></td>
</div>
</div>
</section>

BIN
employee_vehicle_request/static/description/vehicle-request-cybrosys-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
employee_vehicle_request/static/description/vehicle-request-cybrosys-2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

BIN
employee_vehicle_request/static/description/vehicle-request-cybrosys-3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
employee_vehicle_request/static/description/vehicle-request-cybrosys-4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

127
employee_vehicle_request/views/employee_fleet_view.xml

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="sequence_employee_fleet" model="ir.sequence">
<field name="name">Vehicle Request Code</field>
<field name="code">employee.fleet</field>
<field eval="4" name="padding" />
<field name="prefix">VR</field>
</record>
<record model="ir.ui.view" id="fleet_vehicle_inherit_form_view">
<field name="name">fleet.vehicle.form.inherit.view</field>
<field name="model">fleet.vehicle</field>
<field name="inherit_id" ref="fleet.fleet_vehicle_view_form"/>
<field name="arch" type="xml">
<field name="car_value" position="after">
<field name="check_availability" invisible="1"/>
<field name="reserved_time" invisible="1"/>
</field>
</field>
</record>
<record model='ir.ui.view' id='employee_fleet_form_view'>
<field name="name">employee.fleet.form</field>
<field name="model">employee.fleet</field>
<field name="arch" type="xml">
<form string="Employee Fleet Request">
<header>
<button name='send' string="Send Request" type="object" class='oe_highlight' states="draft"/>
<button name='approve' string="Approve" type="object" class='oe_highlight'
states="waiting" groups="hr.group_hr_manager,hr.group_hr_user"/>
<button name='reject' string="Reject" type="object" states="waiting" groups="hr.group_hr_manager,hr.group_hr_user"/>
<button name='cancel' string="Cancel" type="object" states="draft,waiting"/>
<button name='returned' string="Return" type="object" class='oe_highlight'
states="confirm" groups="hr.group_hr_manager,hr.group_hr_user"/>
<field name="state" widget="statusbar" statusbar_visible="draft,waiting,confirm,return"/>
</header>
<sheet>
<h1>
<field name="name" readonly="1"/>
</h1>
<group>
<group>
<field name="employee" options="{'no_create': True}"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="returned_date" attrs="{'invisible': [('state','!=','return')]}"/>
</group>
<group>
<field name="req_date"/>
<field name="fleet" domain="[('check_availability','=',True)]" options="{'no_create': True}"/>
<field name="purpose"/>
</group>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record model='ir.ui.view' id='employee_fleet_tree_view'>
<field name="name">employee.fleet.tree</field>
<field name="model">employee.fleet</field>
<field name="arch" type="xml">
<tree decoration-info="state == 'draft'" colors="grey:state == 'cancel';green:state == 'confirm';
red:state == 'reject';grey:state == 'return';">
<field name="name"/>
<field name="employee"/>
<field name="fleet"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="state"/>
</tree>
</field>
</record>
<record model='ir.ui.view' id='employee_fleet_search_view'>
<field name="name">employee.fleet.search</field>
<field name="model">employee.fleet</field>
<field name="arch" type="xml">
<search string="Custody">
<field name="name"/>
<field name="employee"/>
<field name="fleet"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="state"/>
<separator/>
<group expand="0" string="Group By">
<filter string="Status" name="status" domain="[]" context="{'group_by':'state'}"/>
<filter string="Employee" name="employee" domain="[]" context="{'group_by':'employee'}"/>
<filter string="Vehicle" name="vehicle" domain="[]" context="{'group_by':'fleet'}"/>
</group>
</search>
</field>
</record>
<record id="action_employee_fleet" model="ir.actions.act_window">
<field name="name">Vehicle Request</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">employee.fleet</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="employee_fleet_search_view"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a New Vehicle Request.
</p>
</field>
</record>
<menuitem id="employee_fleet_menu"
name="Vehicle Request"
parent="hr.menu_hr_root"
sequence="4"
groups="hr.group_hr_manager"/>
<menuitem id="employee_fleet_sub_menu"
name="Vehicle Request"
parent="employee_fleet_menu"
sequence="1"
groups="hr.group_hr_manager"
action="action_employee_fleet"/>
</data>
</odoo>
Loading…
Cancel
Save