diff --git a/employee_stages/README.rst b/employee_stages/README.rst new file mode 100755 index 000000000..74b874ea5 --- /dev/null +++ b/employee_stages/README.rst @@ -0,0 +1,13 @@ +EMPLOYEE STAGES +=============== +Manage different stages of an employee. + +Configuration +============= + +No additional configurations needed + +Credits +======= +Developer: V13 Varsha Vivek K @ cybrosys, Contact: odoo@cybrosys.com + V14 Minhaj T @ cybrosys, Contact: odoo@cybrosys.com diff --git a/employee_stages/__init__.py b/employee_stages/__init__.py new file mode 100755 index 000000000..7bdbb3680 --- /dev/null +++ b/employee_stages/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies (). +# Author: Cybrosys Technologies () +# +# 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 . +# +################################################################################### + +from . import models + diff --git a/employee_stages/__manifest__.py b/employee_stages/__manifest__.py new file mode 100755 index 000000000..885740bcc --- /dev/null +++ b/employee_stages/__manifest__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies (). +# Author: Cybrosys Technologies () +# +# 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 . +# +################################################################################### + +{ + 'name': 'Employee Stages', + 'version': '14.0.1.0.0', + 'summary': """Manages Employee Stages""", + 'description': """This module is used to tracking employee's different stages.""", + 'category': "Generic Modules/Human Resources", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base', 'hr'], + 'data': [ + 'security/ir.model.access.csv', + 'views/employee_stages_view.xml', + ], + 'demo': [], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} + + diff --git a/employee_stages/doc/RELEASE_NOTES.md b/employee_stages/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..dead4b7b0 --- /dev/null +++ b/employee_stages/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 03.10.2020 +#### Version 14.0.1.0.0 +##### ADD +- Initial commit for Employee Stages diff --git a/employee_stages/models/__init__.py b/employee_stages/models/__init__.py new file mode 100755 index 000000000..4833243fc --- /dev/null +++ b/employee_stages/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies (). +# Author: Cybrosys Technologies () +# +# 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 . +# +################################################################################### + +from . import employee_stages + diff --git a/employee_stages/models/employee_stages.py b/employee_stages/models/employee_stages.py new file mode 100755 index 000000000..9a2b7e69e --- /dev/null +++ b/employee_stages/models/employee_stages.py @@ -0,0 +1,147 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies (). +# Author: Cybrosys Technologies () +# +# 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 . +# +################################################################################### + +from datetime import date +from odoo import models, fields, api + + +class EmployeeFormInherit(models.Model): + _inherit = 'hr.employee' + + @api.model + def create(self, vals): + result = super(EmployeeFormInherit, self).create(vals) + result.stages_history.sudo().create({'start_date': date.today(), + 'employee_id': result.id, + 'state': 'joined'}) + return result + + def start_grounding(self): + self.state = 'grounding' + self.stages_history.sudo().create({'start_date': date.today(), + 'employee_id': self.id, + 'state': 'grounding'}) + + def set_as_employee(self): + self.state = 'employment' + stage_obj = self.stages_history.search([('employee_id', '=', self.id), + ('state', '=', 'test_period')]) + if stage_obj: + stage_obj.sudo().write({'end_date': date.today()}) + self.stages_history.sudo().create({'start_date': date.today(), + 'employee_id': self.id, + 'state': 'employment'}) + + def start_notice_period(self): + self.state = 'notice_period' + stage_obj = self.stages_history.search([('employee_id', '=', self.id), + ('state', '=', 'employment')]) + if stage_obj: + stage_obj.sudo().write({'end_date': date.today()}) + self.stages_history.sudo().create({'start_date': date.today(), + 'employee_id': self.id, + 'state': 'notice_period'}) + + def relived(self): + self.state = 'relieved' + self.active = False + stage_obj = self.stages_history.search([('employee_id', '=', self.id), + ('state', '=', 'notice_period')]) + if stage_obj: + stage_obj.sudo().write({'end_date': date.today()}) + self.stages_history.sudo().create({'end_date': date.today(), + 'employee_id': self.id, + 'state': 'relieved'}) + + def start_test_period(self): + self.state = 'test_period' + self.stages_history.search([('employee_id', '=', self.id), + ('state', '=', 'grounding')]).sudo().write({'end_date': date.today()}) + self.stages_history.sudo().create({'start_date': date.today(), + 'employee_id': self.id, + 'state': 'test_period'}) + + def terminate(self): + self.state = 'terminate' + self.active = False + stage_obj = self.stages_history.search([('employee_id', '=', self.id), + ('state', '=', 'employment')]) + + if stage_obj: + stage_obj.sudo().write({'end_date': date.today()}) + else: + self.stages_history.search([('employee_id', '=', self.id), + ('state', '=', 'grounding')]).sudo().write({'end_date': date.today()}) + self.stages_history.sudo().create({'end_date': date.today(), + 'employee_id': self.id, + 'state': 'terminate'}) + + 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 = fields.One2many('hr.employee.status.history', 'employee_id', string='Stage History', + help='It shows the duration and history of each stages') + + +class EmployeeStageHistory(models.Model): + _name = 'hr.employee.status.history' + _description = 'Status History' + + start_date = fields.Date(string='Start Date') + end_date = fields.Date(string='End Date') + duration = fields.Integer(compute='get_duration', string='Duration(days)') + + def get_duration(self): + self.duration = 0 + for each in self: + if each.end_date and each.start_date: + duration = fields.Date.from_string(each.end_date) - fields.Date.from_string(each.start_date) + each.duration = duration.days + + 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', invisible=1) + + +class WizardEmployee(models.TransientModel): + _name = 'wizard.employee.stage' + + def set_as_employee(self): + context = self._context + employee_obj = self.env['hr.employee'].search([('id', '=', context.get('employee_id'))]) + if self.related_user: + employee_obj.user_id = self.related_user + employee_obj.set_as_employee() + + related_user = fields.Many2one('res.users', string="Related User") diff --git a/employee_stages/security/ir.model.access.csv b/employee_stages/security/ir.model.access.csv new file mode 100755 index 000000000..fb8ce590e --- /dev/null +++ b/employee_stages/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_wizard_employee_stage_manager,wizard.employee.stage.manager,model_wizard_employee_stage,hr.group_hr_manager,1,1,1,1 +access_wizard_employee_stage_hr_user,wizard.employee.stage.user,model_wizard_employee_stage,hr.group_hr_user,1,1,1,0 +access_hr_employee_status_history_manager,hr.employee.status.history.manager,model_hr_employee_status_history,hr.group_hr_manager,1,1,1,1 +access_hr_employee_status_history_hr_user,hr.employee.status.history.user,model_hr_employee_status_history,hr.group_hr_user,1,1,1,0 + + diff --git a/employee_stages/static/description/banner.png b/employee_stages/static/description/banner.png new file mode 100644 index 000000000..6b4a9626c Binary files /dev/null and b/employee_stages/static/description/banner.png differ diff --git a/employee_stages/static/description/icon.png b/employee_stages/static/description/icon.png new file mode 100644 index 000000000..2fa9c97eb Binary files /dev/null and b/employee_stages/static/description/icon.png differ diff --git a/employee_stages/static/description/images/automatic_payroll.png b/employee_stages/static/description/images/automatic_payroll.png new file mode 100755 index 000000000..cd1d8e5e8 Binary files /dev/null and b/employee_stages/static/description/images/automatic_payroll.png differ diff --git a/employee_stages/static/description/images/checked.png b/employee_stages/static/description/images/checked.png new file mode 100755 index 000000000..578cedb80 Binary files /dev/null and b/employee_stages/static/description/images/checked.png differ diff --git a/employee_stages/static/description/images/cybrosys.png b/employee_stages/static/description/images/cybrosys.png new file mode 100755 index 000000000..d76b5bafb Binary files /dev/null and b/employee_stages/static/description/images/cybrosys.png differ diff --git a/employee_stages/static/description/images/employee_documents_expiry.png b/employee_stages/static/description/images/employee_documents_expiry.png new file mode 100755 index 000000000..bc39822ea Binary files /dev/null and b/employee_stages/static/description/images/employee_documents_expiry.png differ diff --git a/employee_stages/static/description/images/employee_orientation.png b/employee_stages/static/description/images/employee_orientation.png new file mode 100755 index 000000000..ff8c75e5a Binary files /dev/null and b/employee_stages/static/description/images/employee_orientation.png differ diff --git a/employee_stages/static/description/images/employee_stage.png b/employee_stages/static/description/images/employee_stage.png new file mode 100755 index 000000000..89618eada Binary files /dev/null and b/employee_stages/static/description/images/employee_stage.png differ diff --git a/employee_stages/static/description/images/employee_stage_1.png b/employee_stages/static/description/images/employee_stage_1.png new file mode 100755 index 000000000..bb11d10fa Binary files /dev/null and b/employee_stages/static/description/images/employee_stage_1.png differ diff --git a/employee_stages/static/description/images/employee_stage_2.png b/employee_stages/static/description/images/employee_stage_2.png new file mode 100755 index 000000000..18da39e95 Binary files /dev/null and b/employee_stages/static/description/images/employee_stage_2.png differ diff --git a/employee_stages/static/description/images/employee_stage_3.png b/employee_stages/static/description/images/employee_stage_3.png new file mode 100755 index 000000000..d22bb4a60 Binary files /dev/null and b/employee_stages/static/description/images/employee_stage_3.png differ diff --git a/employee_stages/static/description/images/employee_stage_4.png b/employee_stages/static/description/images/employee_stage_4.png new file mode 100755 index 000000000..a6b020402 Binary files /dev/null and b/employee_stages/static/description/images/employee_stage_4.png differ diff --git a/employee_stages/static/description/images/employee_stage_5.png b/employee_stages/static/description/images/employee_stage_5.png new file mode 100755 index 000000000..5b84bd9e4 Binary files /dev/null and b/employee_stages/static/description/images/employee_stage_5.png differ diff --git a/employee_stages/static/description/images/employee_stage_6.png b/employee_stages/static/description/images/employee_stage_6.png new file mode 100755 index 000000000..c731a4e18 Binary files /dev/null and b/employee_stages/static/description/images/employee_stage_6.png differ diff --git a/employee_stages/static/description/images/employee_stage_7.png b/employee_stages/static/description/images/employee_stage_7.png new file mode 100755 index 000000000..b1a47f72f Binary files /dev/null and b/employee_stages/static/description/images/employee_stage_7.png differ diff --git a/employee_stages/static/description/images/employee_stage_8.png b/employee_stages/static/description/images/employee_stage_8.png new file mode 100755 index 000000000..504fa7cdc Binary files /dev/null and b/employee_stages/static/description/images/employee_stage_8.png differ diff --git a/employee_stages/static/description/images/employee_stage_9.png b/employee_stages/static/description/images/employee_stage_9.png new file mode 100755 index 000000000..118dc6551 Binary files /dev/null and b/employee_stages/static/description/images/employee_stage_9.png differ diff --git a/employee_stages/static/description/images/hr_payroll_account_community.gif b/employee_stages/static/description/images/hr_payroll_account_community.gif new file mode 100755 index 000000000..01b20bacf Binary files /dev/null and b/employee_stages/static/description/images/hr_payroll_account_community.gif differ diff --git a/employee_stages/static/description/images/hr_payroll_community.gif b/employee_stages/static/description/images/hr_payroll_community.gif new file mode 100755 index 000000000..0001f3d0d Binary files /dev/null and b/employee_stages/static/description/images/hr_payroll_community.gif differ diff --git a/employee_stages/static/description/images/timesheets_by_employee.png b/employee_stages/static/description/images/timesheets_by_employee.png new file mode 100755 index 000000000..2c4c891a0 Binary files /dev/null and b/employee_stages/static/description/images/timesheets_by_employee.png differ diff --git a/employee_stages/static/description/index.html b/employee_stages/static/description/index.html new file mode 100755 index 000000000..92e907ff1 --- /dev/null +++ b/employee_stages/static/description/index.html @@ -0,0 +1,409 @@ + + +
cybrosys-logo
+ +
+
+
+

Employee Stages

+

Manages Employee Stages

+
+

Key Highlights

+
    +
  • Managing employee's different stages.
  • +
  • Added employee's current stage in the tree view and the kanban view.
  • +
  • Added group by stage and filters in search view.
  • +
  • Added default search for employees in the search bar.
  • +
  • Automatically recording the stage history.
  • +
  • Computing the duration of each stage.
  • +
  • Option to set 'Related User' while converting to the employee.
  • +
  • Automatically inactive the employee while terminating or relieving the employee
  • + +
+
+
+
+
+ + + + + + +
+
+
+ + + +
+
+ +

Overview

+
+

+ 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. +

+ +
+ +

Employee Stages

+
+
    + +

    + Managing employee's different stages.

    +

    + Added employee's current stage in the tree view.

    + +

    + Added employee's current stage in kanban view.

    + +

    + Added group by stage in search view.

    +

    + Added Employee filter in search view.

    + +

    + Added default search for employees in the search bar.

    +

    + Automatically recording the stage history.

    +

    + Computing the duration of each stage.

    +

    + Option to set 'Related User' while converting to the employee.

    +

    + Automatically inactive the employee while terminating or relieving the employee.

    +
+
+ + + +
+ +
+

Screenshots

+
+
+
+ +
+
+
+
+ + + +
+
    + + +
+
+
+
+
+
+ +
+

Suggested Products

+
+ +
+ +
+

Our Service

+
+ +
+
+
+

Our Industries

+
+ +
+
+
+ +
+
+

Trading

+

Easily procure and sell your products.

+
+
+
+
+ +
+
+

Manufacturing

+

Plan, track and schedule your operations.

+
+
+
+
+ +
+
+

Restaurant

+

Run your bar or restaurant methodical.

+
+
+
+
+ +
+
+

POS

+

Easy configuring and convivial selling.

+
+
+
+
+ +
+
+

E-commerce & Website

+

Mobile friendly, awe-inspiring product pages.

+
+
+
+
+ +
+
+

Hotel Management

+

An all-inclusive hotel management application.

+
+
+
+
+ +
+
+

Education

+

A Collaborative platform for educational management.

+
+
+
+
+ +
+
+

Service Management

+

Keep track of services and invoice accordingly.

+
+
+
+
+
+ + + + +
+
+
+

Need Any Help?

+
+ +

If you have anything to share with us based on your use of this module, please let us know. We are ready to offer our support.

+
+

Email us

+

odoo@cybrosys.com / info@cybrosys.com

+ +
+
+

Contact Us

+ www.cybrosys.com +
+
+ +
+
+ + +
+
+
+ + + + +
+
+ +
+ + + + + + + + +
+
+
+ + diff --git a/employee_stages/views/employee_stages_view.xml b/employee_stages/views/employee_stages_view.xml new file mode 100755 index 000000000..76f3e0d11 --- /dev/null +++ b/employee_stages/views/employee_stages_view.xml @@ -0,0 +1,113 @@ + + + + wizard.employee.form + wizard.employee.stage + +
+ + + +
+
+
+
+
+ + + Set as Employee + wizard.employee.stage + form + + new + + + + hr.employee.form.view + hr.employee + + + +