15 changed files with 447 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||||
|
OHRMS Employee Info |
||||
|
------------------- |
||||
|
Supporting Addon for Open HRMS, Added Advance Fields On Employee Master |
||||
|
|
||||
|
Connect with experts |
||||
|
-------------------- |
||||
|
|
||||
|
If you have any question/queries/additional works on OpenHRMS or this module, You can drop an email directly to Cybrosys. |
||||
|
|
||||
|
Contacts |
||||
|
-------- |
||||
|
info - info@cybrosys.com |
||||
|
Jesni Banu - jesni@cybrosys.in |
||||
|
|
||||
|
Website: |
||||
|
https://www.openhrms.com |
||||
|
https://www.cybrosys.com |
@ -0,0 +1,6 @@ |
|||||
|
## Module <hr_employee_updation> |
||||
|
|
||||
|
#### 30.03.2018 |
||||
|
#### Version 10.0.1.0.0 |
||||
|
##### ADD |
||||
|
- Initial commit for OpenHrms Project |
@ -0,0 +1,25 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################### |
||||
|
# A part of OpenHRMS Project <https://www.openhrms.com> |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
||||
|
# Author: Jesni Banu (<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 |
||||
|
|
||||
|
|
@ -0,0 +1,44 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################### |
||||
|
# A part of OpenHRMS Project <https://www.openhrms.com> |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
||||
|
# Author: Jesni Banu (<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': 'OHRMS Employee Info', |
||||
|
'version': '10.0.1.0.0', |
||||
|
'summary': """Adding Advance Fields In Employee Master""", |
||||
|
'description': 'This module helps you to add more information in employee records.', |
||||
|
'category': 'Generic Modules/Human Resources', |
||||
|
'author': 'Cybrosys Techno Solutions', |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'website': "https://www.openhrms.com", |
||||
|
'depends': ['base', 'hr', 'mail', 'hr_gamification'], |
||||
|
'data': [ |
||||
|
'security/ir.model.access.csv', |
||||
|
'views/hr_employee_view.xml', |
||||
|
'views/hr_notification.xml', |
||||
|
], |
||||
|
'demo': [], |
||||
|
'images': ['static/description/banner.jpg'], |
||||
|
'license': 'AGPL-3', |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
'application': False, |
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################### |
||||
|
# A part of OpenHRMS Project <https://www.openhrms.com> |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
||||
|
# Author: Jesni Banu (<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 hr_employee |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
@ -0,0 +1,126 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
################################################################################### |
||||
|
# A part of OpenHRMS Project <https://www.openhrms.com> |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>). |
||||
|
# Author: Jesni Banu (<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 datetime import datetime, timedelta |
||||
|
from odoo import models, fields, _ |
||||
|
|
||||
|
GENDER_SELECTION = [('male', 'Male'), |
||||
|
('female', 'Female'), |
||||
|
('other', 'Other')] |
||||
|
|
||||
|
|
||||
|
class HrEmployeeContractName(models.Model): |
||||
|
_name = 'hr.emergency.contact' |
||||
|
_description = 'HR Emergency Contact' |
||||
|
|
||||
|
number = fields.Char(string='Number') |
||||
|
relation = fields.Char(string='Contact') |
||||
|
employee_obj = fields.Many2one('hr.employee', invisible=1) |
||||
|
|
||||
|
|
||||
|
class HrEmployeeDocumentName(models.Model): |
||||
|
_name = 'hr.document.document' |
||||
|
_description = 'HR Employee Documents' |
||||
|
|
||||
|
name = fields.Char(string='Name') |
||||
|
|
||||
|
|
||||
|
class HrEmployeeFamily(models.Model): |
||||
|
_name = 'hr.employee.family' |
||||
|
_description = 'HR Employee Family' |
||||
|
|
||||
|
member_name = fields.Char(string='Name', related='employee_ref.name', store=True) |
||||
|
employee_id = fields.Many2one(string="Employee", comodel_name='hr.employee', invisible=1) |
||||
|
employee_ref = fields.Many2one(string="Is Employee", comodel_name='hr.employee') |
||||
|
member_id = fields.Char(string='Identification No', related='employee_ref.identification_id', store=True) |
||||
|
member_passport = fields.Char(string='Passport No', related='employee_ref.passport_id', store=True) |
||||
|
member_passport_expiry_date = fields.Date(string='Expiry Date', related='employee_ref.passport_expiry_date', |
||||
|
store=True) |
||||
|
relation = fields.Selection([('father', 'Father'), |
||||
|
('mother', 'Mother'), |
||||
|
('daughter', 'Daughter'), |
||||
|
('son', 'Son'), |
||||
|
('wife', 'Wife')], string='Relationship') |
||||
|
member_contact = fields.Char(string='Contact No', related='employee_ref.personal_mobile', store=True) |
||||
|
date_of_birth = fields.Date(string="Date of Birth", related='employee_ref.birthday', store=True) |
||||
|
gender = fields.Selection(string='Gender', selection=GENDER_SELECTION, related='employee_ref.gender', store=True) |
||||
|
|
||||
|
|
||||
|
class HrEmployee(models.Model): |
||||
|
_inherit = 'hr.employee' |
||||
|
|
||||
|
def mail_reminder(self): |
||||
|
now = datetime.now() + timedelta(days=1) |
||||
|
date_now = now.date() |
||||
|
match = self.search([]) |
||||
|
for i in match: |
||||
|
if i.id_expiry_date: |
||||
|
exp_date = fields.Date.from_string(i.id_expiry_date) - timedelta(days=14) |
||||
|
if date_now >= exp_date: |
||||
|
mail_content = " Hello " + i.name + ",<br>Your ID " + i.identification_id + "is going to expire on " + \ |
||||
|
str(i.id_expiry_date) + ". Please renew it before expiry date" |
||||
|
main_content = { |
||||
|
'subject': _('ID-%s Expired On %s') % (i.identification_id, i.id_expiry_date), |
||||
|
'author_id': self.env.user.partner_id.id, |
||||
|
'body_html': mail_content, |
||||
|
'email_to': i.work_email, |
||||
|
} |
||||
|
self.env['mail.mail'].create(main_content).send() |
||||
|
match1 = self.search([]) |
||||
|
for i in match1: |
||||
|
if i.passport_expiry_date: |
||||
|
exp_date1 = fields.Date.from_string(i.passport_expiry_date) - timedelta(days=180) |
||||
|
if date_now >= exp_date1: |
||||
|
mail_content = " Hello " + i.name + ",<br>Your Passport " + i.passport_id + "is going to expire on " + \ |
||||
|
str(i.passport_expiry_date) + ". Please renew it before expiry date" |
||||
|
main_content = { |
||||
|
'subject': _('Passport-%s Expired On %s') % (i.passport_id, i.passport_expiry_date), |
||||
|
'author_id': self.env.user.partner_id.id, |
||||
|
'body_html': mail_content, |
||||
|
'email_to': i.work_email, |
||||
|
} |
||||
|
self.env['mail.mail'].create(main_content).send() |
||||
|
personal_mobile = fields.Char(string='Mobile', related='address_home_id.mobile', store=True) |
||||
|
emergency_contact = fields.One2many('hr.emergency.contact', 'employee_obj', string='Emergency Contact') |
||||
|
joining_date = fields.Date(string='Joining Date') |
||||
|
id_expiry_date = fields.Date(string='Expiry Date') |
||||
|
passport_expiry_date = fields.Date(string='Expiry Date') |
||||
|
id_attachment_id = fields.Many2many('ir.attachment', 'id_attachment_rel', 'id_ref', 'attach_ref', |
||||
|
string="Attachment", help='You can attach the copy of your Id') |
||||
|
passport_attachment_id = fields.Many2many('ir.attachment', 'passport_attachment_rel', 'passport_ref', 'attach_ref1', |
||||
|
string="Attachment", |
||||
|
help='You can attach the copy of Passport') |
||||
|
fam_ids = fields.One2many('hr.employee.family', 'employee_id', string='Family') |
||||
|
|
||||
|
|
||||
|
class HrEmployeeAttachment(models.Model): |
||||
|
_inherit = 'ir.attachment' |
||||
|
|
||||
|
id_attachment_rel = fields.Many2many('hr.employee', 'id_attachment_id', 'attach_ref', 'id_ref', string="Attachment", |
||||
|
invisible=1) |
||||
|
passport_attachment_rel = fields.Many2many('hr.employee', 'passport_attachment_id', 'attach_ref1', 'passport_ref', |
||||
|
string="Attachment", invisible=1) |
||||
|
training_attach_rel = fields.Many2many('ir.attachment', 'certificate_id', 'training_attach_id3', 'training_id', |
||||
|
string="Certificates", invisible=1, |
||||
|
help='You can attach the copy of your certificate') |
||||
|
|
||||
|
|
|
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 221 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 31 KiB |
@ -0,0 +1,84 @@ |
|||||
|
|
||||
|
<section class="oe_container oe_dark"> |
||||
|
<div class="oe_row oe_spaced"> |
||||
|
<h2 class="oe_slogan">OpenHRMS</h2> |
||||
|
<h3 class="oe_slogan">Most advanced open source HR management software</h3> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<section class="oe_container"> |
||||
|
<div class="oe_row oe_spaced oe_mt32"> |
||||
|
<div class="oe_span"> |
||||
|
<div class="oe_demo oe_picture oe_screenshot"> |
||||
|
<a href="https://www.openhrms.com/#request-demo"> |
||||
|
<img src="HRMS-BUTTON.png"> |
||||
|
</a> |
||||
|
<div class="oe_demo_footer oe_centeralign">Online Demo</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<section class="oe_container"> |
||||
|
<div class="oe_row oe_spaced"> |
||||
|
<h2 class="oe_slogan">OH Employee Info</h2> |
||||
|
<h3 class="oe_slogan">Added Advance Fields On Employee Master</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;"> ☑ </span> Added family information.<br/> |
||||
|
<span style="color:green;"> ☑ </span> Added joining date and contact info.<br/> |
||||
|
<span style="color:green;"> ☑ </span> Added passport and id expiry date and attachments.<br/> |
||||
|
<span style="color:green;"> ☑ </span> Added expiry notification for passport and id documents.<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;"> |
||||
|
This module added some advanced features on Employee master. |
||||
|
Such as family info, joining date, passport and Id expiry date. |
||||
|
This module also sends expiry notification for passport and id to corresponding employees. |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<div class="row section-content"> |
||||
|
<div class="col-md-6 img-content"> |
||||
|
<h3>Our Odoo Services</h3> |
||||
|
</div> |
||||
|
<div class="bc-span col-md-12"> |
||||
|
<div class="inner-span"> |
||||
|
<a target="_blank" href="https://www.openhrms.com"> |
||||
|
<img class="img-border img-responsive thumbnail" src="cybro-service.png"> |
||||
|
</a> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<section class="oe_container"> |
||||
|
<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> |
||||
|
</section> |
||||
|
|
||||
|
|
@ -0,0 +1,96 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<data> |
||||
|
<menuitem id="employee_report_menu" name="Reports" parent="hr.menu_hr_root" sequence="30" |
||||
|
groups="hr.group_hr_manager,hr.group_hr_user"/> |
||||
|
<menuitem id="menu_hr_management" name="HR Management" parent="hr.menu_hr_root" sequence="5" |
||||
|
groups="hr.group_hr_manager,hr.group_hr_user"/> |
||||
|
<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"> |
||||
|
<xpath expr="//page[@name='personal_information']/group" position="inside"> |
||||
|
<group name="emergency_contact" colspan="4" string="Emergency Contact"> |
||||
|
<field name="emergency_contact"> |
||||
|
<tree editable="bottom"> |
||||
|
<field name="number"/> |
||||
|
<field name="relation"/> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</group> |
||||
|
</xpath> |
||||
|
<field name="address_home_id" position="after"> |
||||
|
<field name="personal_mobile"/> |
||||
|
</field> |
||||
|
<field name="user_id" position="after"> |
||||
|
<field name="joining_date"/> |
||||
|
</field> |
||||
|
<field name="identification_id" position="after"> |
||||
|
<field name="id_expiry_date" groups="hr.group_hr_user" attrs="{'invisible': [('identification_id', 'in', [None,False])]}"/> |
||||
|
<field name="id_attachment_id" groups="hr.group_hr_user" widget="many2many_binary" class="oe_inline"/> |
||||
|
</field> |
||||
|
<field name="passport_id" position="after"> |
||||
|
<field name="passport_expiry_date" groups="hr.group_hr_user" attrs="{'invisible': [('passport_id', 'in', [None,False])]}"/> |
||||
|
<field name="passport_attachment_id" groups="hr.group_hr_user" widget="many2many_binary" class="oe_inline"/> |
||||
|
</field> |
||||
|
<page name="hr_settings" position="after"> |
||||
|
<page name="family_info" string="Family Information" groups="hr.group_hr_user"> |
||||
|
<group string="Family"> |
||||
|
<field name="fam_ids" nolabel="1"> |
||||
|
<form> |
||||
|
<group> |
||||
|
<group name="general_info"> |
||||
|
<field name="employee_id" invisible="1"/> |
||||
|
<field name="employee_ref"/> |
||||
|
<field name="member_name"/> |
||||
|
<field name="date_of_birth"/> |
||||
|
<field name="member_id"/> |
||||
|
<field name="member_passport"/> |
||||
|
<field name="member_passport_expiry_date" |
||||
|
attrs="{'invisible': [('member_passport', 'in', [None,False])]}"/> |
||||
|
</group> |
||||
|
<group name="contact_info"> |
||||
|
<field name="gender"/> |
||||
|
<field name="relation"/> |
||||
|
<field name="member_contact"/> |
||||
|
</group> |
||||
|
</group> |
||||
|
</form> |
||||
|
<tree> |
||||
|
<field name="member_name"/> |
||||
|
<field name="relation"/> |
||||
|
<field name="member_contact"/> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</group> |
||||
|
</page> |
||||
|
</page> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="hr_gamification.hr_hr_employee_view_form" model="ir.ui.view"> |
||||
|
<field name="name">hr.employee.view.form.inherit</field> |
||||
|
<field name="model">hr.employee</field> |
||||
|
<field name="inherit_id" ref="hr.view_employee_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//page[@name='public']" position="after"> |
||||
|
<page string="Received Badges" attrs="{'invisible': [('user_id', '=', False)]}"> |
||||
|
<div name="badges" groups="hr.group_hr_user"> |
||||
|
<field name="has_badges" invisible="1"/> |
||||
|
<button string="Grant a Badge" type="action" name="%(hr_gamification.action_reward_wizard)d"/> to reward this employee for a good action |
||||
|
<div class="oe_view_nocontent" attrs="{'invisible': [('has_badges', '=', True)]}"> |
||||
|
<p class="oe_view_nocontent_create"> |
||||
|
Click to grant this employee his first badge |
||||
|
</p><p class="oe_grey"> |
||||
|
Badges are rewards of good work. Give them to people you believe deserve it. |
||||
|
</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
<field name="badge_ids" widget="many2many_kanban" /> |
||||
|
</page> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,15 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
<data> |
||||
|
<record model="ir.cron" id="employee_data_reminder"> |
||||
|
<field name="name">HR Employee Data Expiration</field> |
||||
|
<field name="interval_number">1</field> |
||||
|
<field name="interval_type">days</field> |
||||
|
<field name="numbercall">-1</field> |
||||
|
<field name="doall" eval="False"/> |
||||
|
<field name="model" eval="'hr.employee'"/> |
||||
|
<field name="function" eval="'mail_reminder'"/> |
||||
|
<field name="args" eval="'()'" /> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
Loading…
Reference in new issue