@ -0,0 +1,52 @@ |
|||
.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg |
|||
:target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html |
|||
:alt: License: LGPL-3 |
|||
|
|||
Employee Stages |
|||
=============== |
|||
Every employee may undergo different stages during his term in a company.It may be probation, training, employment etc.The stages may vary according to the organisation.It is important to track such stages systematically to assess the performance indices of an employee.So here we are providing a new module which will facilitate the management of different stages of an employee. |
|||
|
|||
Configuration |
|||
============= |
|||
* No additional configurations needed |
|||
|
|||
Company |
|||
------- |
|||
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
|||
|
|||
License |
|||
------- |
|||
General Public License, Version 3 (LGPL v3). |
|||
(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) |
|||
|
|||
Credits |
|||
------- |
|||
Developer: V13 Varsha Vivek K |
|||
V14 Minhaj T |
|||
V15 Aiswarya J P |
|||
V16 Viswanth k |
|||
V17 Gayathri v |
|||
V18 Ashwin T |
|||
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,23 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Ashwin T (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from . import models |
|||
from . import wizard |
@ -0,0 +1,48 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Ashwin T (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
{ |
|||
'name': 'Employee Stages', |
|||
'version': '18.0.1.0.0', |
|||
'category': "Human Resources", |
|||
'summary': """Manages Employee Stages""", |
|||
'description': """ Every employee may undergo different stages during his |
|||
term in a company.It may be probation, training, employment etc.The stages |
|||
may vary according to the organisation.It is important to track such stages |
|||
systematically to assess the performance indices of an employee.So here we |
|||
are providing a new module which will facilitate the management of different |
|||
stages of an employee..""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'maintainer': 'Cybrosys Techno Solutions', |
|||
'website': "https://www.cybrosys.com", |
|||
'depends': ['hr'], |
|||
'data': [ |
|||
'security/ir.model.access.csv', |
|||
'wizard/employee_stage_views.xml', |
|||
'views/hr_employee_views.xml', |
|||
], |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'LGPL-3', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'application': False, |
|||
} |
@ -0,0 +1,6 @@ |
|||
## Module <employee_stages> |
|||
|
|||
#### 11.10.2024 |
|||
#### Version 18.0.1.0.0 |
|||
##### ADD |
|||
- Initial commit for Employee Stages |
@ -0,0 +1,23 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Ashwin T (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from . import hr_employee |
|||
from . import hr_employee_public |
@ -0,0 +1,161 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Ashwin T (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import api, fields, models |
|||
|
|||
|
|||
class HrEmployee(models.Model): |
|||
"""This is used to inherit the employee model""" |
|||
_inherit = 'hr.employee' |
|||
|
|||
state = fields.Selection([('joined', 'Slap On'), |
|||
('grounding', 'Grounding'), |
|||
('test_period', 'Test Period'), |
|||
('employment', 'Employment'), |
|||
('notice_period', 'Notice Period'), |
|||
('relieved', 'Resigned'), |
|||
('terminate', 'Terminated')], string='Status', |
|||
default='joined', |
|||
track_visibility='always', copy=False, |
|||
help="Employee Stages.\nSlap On: " |
|||
"Joined\nGrounding: Training\nTest period : " |
|||
"Probation") |
|||
stages_history_ids = fields.One2many('hr.employee.status.history', |
|||
'employee_id', string='Stage History', |
|||
help='It shows the duration and ' |
|||
'history of history stages') |
|||
|
|||
@api.model_create_multi |
|||
def create(self, vals_list): |
|||
"""This is used to create the default stage as 'Slap On'""" |
|||
result = super().create(vals_list) |
|||
result.stages_history_ids.sudo().create({'start_date': fields.Date.today(), |
|||
'employee_id': result.id, |
|||
'state': 'joined'}) |
|||
return result |
|||
|
|||
def action_start_grounding(self): |
|||
"""This is used to create the ground stage on staging history""" |
|||
self.state = 'grounding' |
|||
self.stages_history_ids.sudo().create({'start_date': fields.Date.today(), |
|||
'employee_id': self.id, |
|||
'state': 'grounding'}) |
|||
|
|||
def set_as_employee(self): |
|||
"""This is used to create the employee stage on staging history""" |
|||
self.state = 'employment' |
|||
stage_history_ids = self.stages_history_ids.search( |
|||
[('employee_id', '=', self.id), |
|||
('state', '=', 'test_period')]) |
|||
if stage_history_ids: |
|||
stage_history_ids.sudo().write({'end_date': fields.Date.today()}) |
|||
self.stages_history_ids.sudo().create({'start_date': fields.Date.today(), |
|||
'employee_id': self.id, |
|||
'state': 'employment'}) |
|||
|
|||
def action_start_notice_period(self): |
|||
"""This is used to create the notice period stage on staging history""" |
|||
self.state = 'notice_period' |
|||
stage_history_ids = self.stages_history_ids.search( |
|||
[('employee_id', '=', self.id), |
|||
('state', '=', 'employment')]) |
|||
if stage_history_ids: |
|||
stage_history_ids.sudo().write({'end_date': fields.Date.today()}) |
|||
self.stages_history_ids.sudo().create({'start_date': fields.Date.today(), |
|||
'employee_id': self.id, |
|||
'state': 'notice_period'}) |
|||
|
|||
def action_relived(self): |
|||
"""This is used to create the relived stage on staging history""" |
|||
self.state = 'relieved' |
|||
self.active = False |
|||
stage_history_ids = self.stages_history_ids.search( |
|||
[('employee_id', '=', self.id), |
|||
('state', '=', |
|||
'notice_period')]) |
|||
if stage_history_ids: |
|||
stage_history_ids.sudo().write({'end_date': fields.Date.today()}) |
|||
self.stages_history_ids.sudo().create({'end_date': fields.Date.today(), |
|||
'employee_id': self.id, |
|||
'state': 'relieved'}) |
|||
|
|||
def action_start_test_period(self): |
|||
"""This is used to create the test period stage on staging history""" |
|||
self.state = 'test_period' |
|||
self.stages_history_ids.search([('employee_id', '=', self.id), |
|||
('state', '=', |
|||
'grounding')]).sudo().write( |
|||
{'end_date': fields.Date.today()}) |
|||
self.stages_history_ids.sudo().create({'start_date': fields.Date.today(), |
|||
'employee_id': self.id, |
|||
'state': 'test_period'}) |
|||
|
|||
def action_terminate(self): |
|||
"""This is used to create the terminate stage on staging history""" |
|||
self.state = 'terminate' |
|||
self.active = False |
|||
stage_history_ids = self.stages_history_ids.search( |
|||
[('employee_id', '=', self.id), |
|||
('state', '=', 'employment')]) |
|||
if stage_history_ids: |
|||
stage_history_ids.sudo().write({'end_date': fields.Date.today()}) |
|||
else: |
|||
self.stages_history_ids.search([('employee_id', '=', self.id), |
|||
('state', '=', |
|||
'grounding')]).sudo().write( |
|||
{'end_date': fields.Date.today()}) |
|||
self.stages_history_ids.sudo().create({'end_date': fields.Date.today(), |
|||
'employee_id': self.id, |
|||
'state': 'terminate'}) |
|||
|
|||
|
|||
class EmployeeStageHistory(models.Model): |
|||
"""This is used to show the employee stages history""" |
|||
_name = 'hr.employee.status.history' |
|||
_description = 'Status History' |
|||
|
|||
start_date = fields.Date(string='Start Date', |
|||
help="Start date of the status period") |
|||
end_date = fields.Date(string='End Date', |
|||
help="End date of the status period") |
|||
duration = fields.Integer(compute='_compute_get_duration', |
|||
string='Duration(days)', |
|||
help="Duration of the stage") |
|||
state = fields.Selection([('joined', 'Slap On'), |
|||
('grounding', 'Grounding'), |
|||
('test_period', 'Test Period'), |
|||
('employment', 'Employment'), |
|||
('notice_period', 'Notice Period'), |
|||
('relieved', 'Resigned'), |
|||
('terminate', 'Terminated')], string='Stage') |
|||
employee_id = fields.Many2one('hr.employee', help="Stage " |
|||
"of the employee", |
|||
invisible=1, string="Employee") |
|||
|
|||
@api.depends('start_date', 'end_date') |
|||
def _compute_get_duration(self): |
|||
"""This is used to calculate the duration for the stages""" |
|||
for history in self: |
|||
history.duration = 0 |
|||
if history.end_date and history.start_date: |
|||
duration = fields.Date.from_string( |
|||
history.end_date) - fields.Date.from_string(history.start_date) |
|||
history.duration = duration.days |
@ -0,0 +1,30 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Ashwin T (odoo@cybrosys.com) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
from odoo import fields, models |
|||
|
|||
|
|||
class HrEmployeePublic(models.Model): |
|||
"""This is used to inherit the public employee model""" |
|||
_inherit = 'hr.employee.public' |
|||
|
|||
state = fields.Selection(related='employee_id.state', string='Stage', |
|||
help="Stages of employee") |
|
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 514 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 912 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 1.8 MiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 87 KiB |
After Width: | Height: | Size: 260 KiB |
After Width: | Height: | Size: 259 KiB |
After Width: | Height: | Size: 274 KiB |
After Width: | Height: | Size: 172 KiB |
After Width: | Height: | Size: 705 KiB |
After Width: | Height: | Size: 322 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 103 KiB |
After Width: | Height: | Size: 102 KiB |
After Width: | Height: | Size: 362 KiB |
After Width: | Height: | Size: 880 KiB |