Browse Source

[ADD] Initial Commit

pull/79/merge
Sreejith P 7 years ago
parent
commit
2a080c174e
  1. 24
      employee_check_list/__init__.py
  2. 45
      employee_check_list/__manifest__.py
  3. 45
      employee_check_list/__manifest__.py~
  4. 25
      employee_check_list/models/__init__.py
  5. 86
      employee_check_list/models/employee_master_inherit.py
  6. 50
      employee_check_list/models/settings.py
  7. BIN
      employee_check_list/static/description/banner.jpg
  8. BIN
      employee_check_list/static/description/cybro_logo.png
  9. BIN
      employee_check_list/static/description/entry_checklist.png
  10. BIN
      employee_check_list/static/description/exit_checklist.png
  11. BIN
      employee_check_list/static/description/form_view.png
  12. BIN
      employee_check_list/static/description/icon.png
  13. 141
      employee_check_list/static/description/index.html
  14. 140
      employee_check_list/static/description/index.html~
  15. BIN
      employee_check_list/static/description/kanban_view.png
  16. BIN
      employee_check_list/static/description/settings.png
  17. BIN
      employee_check_list/static/description/tree_view.png
  18. 38
      employee_check_list/views/checklist_view.xml
  19. 64
      employee_check_list/views/employee_form_inherit_view.xml
  20. 30
      employee_check_list/views/settings_view.xml

24
employee_check_list/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Niyas Raphy (<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

45
employee_check_list/__manifest__.py

@ -0,0 +1,45 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Niyas Raphy (<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 Checklist',
'version': '11.0.1.0.0',
'summary': """Manages Employee's Entry & Exit Process""",
'description': """This module is used to remembering the employee's entry and exit progress.""",
'category': 'Generic Modules/Human Resources',
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'depends': ['base', 'employee_documents_expiry'],
'data': [
'views/employee_form_inherit_view.xml',
'views/checklist_view.xml',
'views/settings_view.xml',
],
'demo': [],
'images': ['static/description/banner.jpg'],
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

45
employee_check_list/__manifest__.py~

@ -0,0 +1,45 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Nilmar Shereef(<https://www.cybrosys.com>)
# you can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# It is forbidden to publish, distribute, sublicense, or sell copies
# of the Software or modified copies of the Software.
#
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Employee Checklist',
'version': '10.0.1.0.0',
'summary': """Manages Employee's Entry & Exit Process""",
'description': """This module is used to remembering the employee's entry and exit progress.""",
'category': "Human Resources",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': "https://www.cybrosys.com",
'depends': ['base', 'employee_documents_expiry'],
'data': [
'security/ir.model.access.csv',
'views/employee_form_inherit_view.xml',
'views/checklist_view.xml',
'views/settings_view.xml',
],
'demo': [],
'images': ['static/description/banner.jpg'],
'license': 'LGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

25
employee_check_list/models/__init__.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Niyas Raphy (<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 employee_master_inherit
from . import settings

86
employee_check_list/models/employee_master_inherit.py

@ -0,0 +1,86 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Niyas Raphy (<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 odoo import models, fields, api
class EmployeeMasterInherit(models.Model):
_inherit = 'hr.employee'
@api.depends('exit_checklist')
def exit_progress(self):
for each in self:
total_len = self.env['employee.checklist'].search_count([('document_type', '=', 'exit')])
entry_len = len(each.exit_checklist)
if total_len != 0:
each.exit_progress = (entry_len * 100) / total_len
@api.depends('entry_checklist')
def entry_progress(self):
for each in self:
total_len = self.env['employee.checklist'].search_count([('document_type', '=', 'entry')])
entry_len = len(each.entry_checklist)
if total_len != 0:
each.entry_progress = (entry_len*100) / total_len
entry_checklist = fields.Many2many('employee.checklist', 'entry_obj', 'check_hr_rel', 'hr_check_rel',
string='Entry Process',
domain=[('document_type', '=', 'entry')])
exit_checklist = fields.Many2many('employee.checklist', 'exit_obj', 'exit_hr_rel', 'hr_exit_rel',
string='Exit Process',
domain=[('document_type', '=', 'exit')])
entry_progress = fields.Float(compute=entry_progress, string='Entry Progress', store=True, default=0.0)
exit_progress = fields.Float(compute=exit_progress, string='Exit Progress', store=True, default=0.0)
maximum_rate = fields.Integer(default=100)
check_list_enable = fields.Boolean(invisible=True, copy=False)
class EmployeeDocumentInherit(models.Model):
_inherit = 'hr.employee.document'
@api.model
def create(self, vals):
result = super(EmployeeDocumentInherit, self).create(vals)
if result.document_name.document_type == 'entry':
result.employee_ref.write({'entry_checklist': [(4, result.document_name.id)]})
if result.document_name.document_type == 'exit':
result.employee_ref.write({'exit_checklist': [(4, result.document_name.id)]})
return result
@api.multi
def unlink(self):
for result in self:
if result.document_name.document_type == 'entry':
result.employee_ref.write({'entry_checklist': [(5, result.document_name.id)]})
if result.document_name.document_type == 'exit':
result.employee_ref.write({'exit_checklist': [(5, result.document_name.id)]})
res = super(EmployeeDocumentInherit, self).unlink()
return res
class EmployeeChecklistInherit(models.Model):
_inherit = 'employee.checklist'
entry_obj = fields.Many2many('hr.employee', 'entry_checklist', 'hr_check_rel', 'check_hr_rel',
invisible=1)
exit_obj = fields.Many2many('hr.employee', 'exit_checklist', 'hr_exit_rel', 'exit_hr_rel',
invisible=1)

50
employee_check_list/models/settings.py

@ -0,0 +1,50 @@
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Niyas Raphy (<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 odoo import models, fields, api
class HRSettings(models.TransientModel):
_inherit = 'res.config.settings'
enable_checklist = fields.Boolean(string='Enable Checklist Progress in Kanban?', default=False)
@api.model
def get_values(self):
res = super(HRSettings, self).get_values()
config = self.env['ir.config_parameter'].sudo()
enable_checklist = config.get_param('employee_check_list.enable_checklist', default=False)
res.update(
enable_checklist=enable_checklist
)
return res
@api.multi
def set_values(self):
super(HRSettings, self).set_values()
self.env['ir.config_parameter'].sudo().set_param('employee_check_list.enable_checklist',
self.enable_checklist)
emp_obj = self.env['hr.employee'].search([])
for rec in emp_obj:
rec.write({'check_list_enable': self.enable_checklist})

BIN
employee_check_list/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

BIN
employee_check_list/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
employee_check_list/static/description/entry_checklist.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
employee_check_list/static/description/exit_checklist.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
employee_check_list/static/description/form_view.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

BIN
employee_check_list/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

141
employee_check_list/static/description/index.html

@ -0,0 +1,141 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Employee Exit/Entry Checklist</h2>
<h3 class="oe_slogan">Manages Employees Entry & Exit Process</h3>
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4>
</div>
<div class="oe_row oe_spaced" style="padding-left:65px;">
<h4>Features:</h4>
<div>
<span style="color:green;"> &#9745; </span> Managing entry/exit process.<br/>
<span style="color:green;"> &#9745; </span> Automatic process on document attachments.<br/>
<span style="color:green;"> &#9745; </span> Option to enable Gauge widget for employee kanban.<br/>
<span style="color:green;"> &#9745; </span> Entry/Exit Percentpie in employee form view.<br/>
<span style="color:green;"> &#9745; </span> Entry Progressbar in employee tree view.<br/>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div class="oe_picture">
<h3 class="oe_slogan">Overview</h3>
<p class="oe_mt32 text-justify" style="text-align: center;">
A well functioning human resource department will lay down a number procedure and process before an employee during joining/resigning time. It may be submission/Return of a certificate or attending a conference etc.
A person has to undergo all these checklist items before being admitted/resigned. The module simplifies the process by providing you a checklist to mark the proceedings. It will also display the PercentPie of the checklist items completed.
</p>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div style="text-align: center">
<p>
<h4>Entry/Exit Checklist</h4>
<p>
</div>
<div style="text-align: center">
<a href="https://www.cybrosys.com">
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:10px solid white;" src="entry_checklist.png">
</div>
</a>
</div>
<div style="text-align: center">
<a href="https://www.cybrosys.com">
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:10px solid white;" src="exit_checklist.png">
</div>
</a>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div style="text-align: center">
<p>
<h4>Employee From View With PercentPie</h4>
</p>
</div>
<div class="" style="text-align: center">
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:10px solid white;" src="form_view.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div style="text-align: center">
<p>
<h4>Employee Tree View With Progressbar</h4>
</p>
</div>
<div class="" style="text-align: center">
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:10px solid white;" src="tree_view.png">
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div style="text-align: center">
<p>
<h4>Employee Kanban View with Gauge</h4>
</p>
</div>
<div class="" style="text-align: center">
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:10px solid white;" src="kanban_view.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div style="text-align: center">
<p>
<h4>Configuration</h4>
</p>
</div>
<div class="" style="text-align: center">
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:10px solid white;" src="settings.png">
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<div>
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
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
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" 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;"></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;"></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;padding-left: 8px;"></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;"></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;"></i></a></td>
</div>
</div>
</section>

140
employee_check_list/static/description/index.html~

@ -0,0 +1,140 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Employee Exit/Entry Checklist</h2>
<h3 class="oe_slogan">Manages Employees Entry & Exit Process</h3>
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4>
</div>
<div class="oe_row oe_spaced" style="padding-left:65px;">
<h4>Features:</h4>
<div>
<span style="color:green;"> &#9745; </span> Managing entry/exit process.<br/>
<span style="color:green;"> &#9745; </span> Automatic process on document attachments.<br/>
<span style="color:green;"> &#9745; </span> Option to enable Gauge widget for employee kanban.<br/>
<span style="color:green;"> &#9745; </span> Entry/Exit Percentpie in employee form view.<br/>
<span style="color:green;"> &#9745; </span> Entry Progressbar in employee tree view.<br/>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div class="oe_picture">
<h3 class="oe_slogan">Overview</h3>
<p class="oe_mt32 text-justify" style="text-align: center;">
A well functioning human resource department will lay down a number procedure and process before an employee during joining/resigning time. It may be submission/Return of a certificate or attending a conference etc.
A person has to undergo all these checklist items before being admitted/resigned. The module simplifies the process by providing you a checklist to mark the proceedings. It will also display the PercentPie of the checklist items completed.
</p>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div style="text-align: center">
<p>
<h4>Entry/Exit Checklist</h4>
<p>
</div>
<div style="text-align: center">
<a href="https://www.cybrosys.com">
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:10px solid white;" src="entry_checklist.png">
</div>
</a>
</div>
<div style="text-align: center">
<a href="https://www.cybrosys.com">
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:10px solid white;" src="exit_checklist.png">
</div>
</a>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div style="text-align: center">
<p>
<h4>Employee From View With PercentPie</h4>
</p>
</div>
<div class="" style="text-align: center">
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:10px solid white;" src="form_view.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div style="text-align: center">
<p>
<h4>Employee Tree View With Progressbar</h4>
</p>
</div>
<div class="" style="text-align: center">
<div class="oe_demo oe_screenshot">
<img style="border:10px solid white;" src="tree_view.png">
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div style="text-align: center">
<p>
<h4>Employee Kanban View with Gauge</h4>
</p>
</div>
<div class="" style="text-align: center">
<div class="oe_demo oe_screenshot">
<img style="border:10px solid white;" src="kanban_view.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div style="text-align: center">
<p>
<h4>Configuration</h4>
</p>
</div>
<div class="" style="text-align: center">
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:10px solid white;" src="settings.png">
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<div>
<a class="btn btn-primary btn-lg mt8"
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i
class="fa fa-envelope"></i> Email </a> <a
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
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" 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;"></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;"></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;padding-left: 8px;"></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;"></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;"></i></a></td>
</div>
</div>
</section>

BIN
employee_check_list/static/description/kanban_view.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

BIN
employee_check_list/static/description/settings.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
employee_check_list/static/description/tree_view.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

38
employee_check_list/views/checklist_view.xml

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="action_entry_checklist" model="ir.actions.act_window">
<field name="name">Entry Checklist</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">employee.checklist</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('document_type', '=', 'entry')]</field>
<field name="context">{"default_document_type":'entry'}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a New Entry Checklist
</p>
</field>
</record>
<record id="action_exit_checklist" model="ir.actions.act_window">
<field name="name">Exit Checklist</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">employee.checklist</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('document_type', '=', 'exit')]</field>
<field name="context">{"default_document_type":'exit'}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a New Exit Checklist
</p>
</field>
</record>
<menuitem id="employee_entry_checklist_menu" name="Entry Checklist" parent="hr.menu_human_resources_configuration" sequence="3"
action="action_entry_checklist"/>
<menuitem id="employee_exit_checklist_menu" name="Exit Checklist" parent="hr.menu_human_resources_configuration" sequence="4"
action="action_exit_checklist"/>
</odoo>

64
employee_check_list/views/employee_form_inherit_view.xml

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record model="ir.ui.view" id="hr_employee_inherit_form_view">
<field name="name">hr.employee.form.view</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<field name="category_ids" position="after">
<div>
<field name="entry_progress" widget="percentpie"/>
<field name="exit_progress" widget="percentpie" class="oe_inline"/>
</div>
</field>
<page name="hr_settings" position="after">
<page name="checklist" string="Checklist">
<group>
<group name="entry_checklist" string="Entry Checklist">
<field name="entry_checklist" widget="many2many_checkboxes"/>
<field name="check_list_enable" invisible="1"/>
</group>
<group name="exit_checklist" string="Exit Checklist">
<field name="exit_checklist" widget="many2many_checkboxes"/>
</group>
</group>
</page>
</page>
</field>
</record>
<record model="ir.ui.view" id="hr_employee_inherit_tree_view">
<field name="name">hr.employee.tree.view</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_tree"/>
<field name="arch" type="xml">
<field name="message_needaction" position="after">
<field name="entry_progress" widget="progressbar"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="hr_employee_inherit_kanban_view">
<field name="name">hr.employee.kanban.view</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.hr_kanban_view_employees"/>
<field name="arch" type="xml">
<xpath expr="//templates" position="before">
<field name="entry_progress"/>
<field name="maximum_rate"/>
<field name="check_list_enable" invisible="1"/>
</xpath>
<xpath expr="//ul/li[5]" position="after">
<li t-if="record.check_list_enable.raw_value==1">
<field name="entry_progress" widget="gauge" style="width:120px;height:90px;cursor:pointer;"
options="{'max_field': 'maximum_rate'}">
Entry Progress
</field>
</li>
</xpath>
</field>
</record>
</odoo>

30
employee_check_list/views/settings_view.xml

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="hr_checklist_settings" model="ir.ui.view">
<field name="name">HR Settings</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="hr.res_config_settings_view_form"/>
<field name="priority" eval="50" />
<field name="arch" type="xml">
<xpath expr="//div[hasclass('app_settings_block')]" position="after">
<div class="row mt16 o_settings_container">
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_right_pane">
<label for="enable_checklist"/>
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
<div class="content-group">
<div class="mt16">
<field name="enable_checklist"/>
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</data>
</odoo>
Loading…
Cancel
Save