From 1ca3b3df3421961caec3b747a364071c80f5c7da Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 10 May 2022 17:14:58 +0700 Subject: initial commit --- hr_employee_updation/README.md | 16 + hr_employee_updation/__init__.py | 25 + hr_employee_updation/__manifest__.py | 46 ++ hr_employee_updation/data/data.xml | 14 + hr_employee_updation/doc/RELEASE_NOTES.md | 6 + hr_employee_updation/i18n/ar_001.po | 248 ++++++++++ hr_employee_updation/models/__init__.py | 29 ++ hr_employee_updation/models/hr_contract_days.py | 16 + hr_employee_updation/models/hr_employee.py | 123 +++++ hr_employee_updation/models/updation_config.py | 31 ++ hr_employee_updation/security/ir.model.access.csv | 5 + .../static/description/assets/icons/chevron.png | Bin 0 -> 310 bytes .../static/description/assets/icons/cogs.png | Bin 0 -> 1377 bytes .../description/assets/icons/consultation.png | Bin 0 -> 1458 bytes .../static/description/assets/icons/ecom-black.png | Bin 0 -> 576 bytes .../description/assets/icons/education-black.png | Bin 0 -> 733 bytes .../description/assets/icons/hotel-black.png | Bin 0 -> 911 bytes .../static/description/assets/icons/license.png | Bin 0 -> 1095 bytes .../static/description/assets/icons/lifebuoy.png | Bin 0 -> 1199 bytes .../assets/icons/manufacturing-black.png | Bin 0 -> 673 bytes .../static/description/assets/icons/pos-black.png | Bin 0 -> 878 bytes .../static/description/assets/icons/puzzle.png | Bin 0 -> 653 bytes .../description/assets/icons/restaurant-black.png | Bin 0 -> 905 bytes .../description/assets/icons/service-black.png | Bin 0 -> 839 bytes .../description/assets/icons/trading-black.png | Bin 0 -> 427 bytes .../static/description/assets/icons/training.png | Bin 0 -> 627 bytes .../static/description/assets/icons/update.png | Bin 0 -> 1225 bytes .../static/description/assets/icons/user.png | Bin 0 -> 988 bytes .../static/description/assets/icons/wrench.png | Bin 0 -> 1205 bytes hr_employee_updation/static/description/banner.png | Bin 0 -> 69409 bytes hr_employee_updation/static/description/icon.png | Bin 0 -> 19751 bytes .../static/description/images/appraisal_image.png | Bin 0 -> 128694 bytes .../static/description/images/bio_image.png | Bin 0 -> 162841 bytes .../static/description/images/checked.png | Bin 0 -> 21786 bytes .../static/description/images/core_image.gif | Bin 0 -> 627021 bytes .../static/description/images/hero.png | Bin 0 -> 205104 bytes .../static/description/images/module_image.gif | Bin 0 -> 140073 bytes .../static/description/images/openhrms.png | Bin 0 -> 7710 bytes .../static/description/images/salary_image.png | Bin 0 -> 117368 bytes .../static/description/images/shift_image.png | Bin 0 -> 117673 bytes .../static/description/images/updation1.png | Bin 0 -> 106233 bytes .../static/description/images/updation2.png | Bin 0 -> 80869 bytes .../static/description/images/updation3.png | Bin 0 -> 44678 bytes hr_employee_updation/static/description/index.html | 535 +++++++++++++++++++++ hr_employee_updation/views/contract_days_view.xml | 17 + hr_employee_updation/views/hr_employee_view.xml | 72 +++ hr_employee_updation/views/hr_notification.xml | 15 + hr_employee_updation/views/updation_config.xml | 27 ++ 48 files changed, 1225 insertions(+) create mode 100644 hr_employee_updation/README.md create mode 100644 hr_employee_updation/__init__.py create mode 100644 hr_employee_updation/__manifest__.py create mode 100644 hr_employee_updation/data/data.xml create mode 100644 hr_employee_updation/doc/RELEASE_NOTES.md create mode 100644 hr_employee_updation/i18n/ar_001.po create mode 100644 hr_employee_updation/models/__init__.py create mode 100644 hr_employee_updation/models/hr_contract_days.py create mode 100644 hr_employee_updation/models/hr_employee.py create mode 100644 hr_employee_updation/models/updation_config.py create mode 100644 hr_employee_updation/security/ir.model.access.csv create mode 100644 hr_employee_updation/static/description/assets/icons/chevron.png create mode 100644 hr_employee_updation/static/description/assets/icons/cogs.png create mode 100644 hr_employee_updation/static/description/assets/icons/consultation.png create mode 100644 hr_employee_updation/static/description/assets/icons/ecom-black.png create mode 100644 hr_employee_updation/static/description/assets/icons/education-black.png create mode 100644 hr_employee_updation/static/description/assets/icons/hotel-black.png create mode 100644 hr_employee_updation/static/description/assets/icons/license.png create mode 100644 hr_employee_updation/static/description/assets/icons/lifebuoy.png create mode 100644 hr_employee_updation/static/description/assets/icons/manufacturing-black.png create mode 100644 hr_employee_updation/static/description/assets/icons/pos-black.png create mode 100644 hr_employee_updation/static/description/assets/icons/puzzle.png create mode 100644 hr_employee_updation/static/description/assets/icons/restaurant-black.png create mode 100644 hr_employee_updation/static/description/assets/icons/service-black.png create mode 100644 hr_employee_updation/static/description/assets/icons/trading-black.png create mode 100644 hr_employee_updation/static/description/assets/icons/training.png create mode 100644 hr_employee_updation/static/description/assets/icons/update.png create mode 100644 hr_employee_updation/static/description/assets/icons/user.png create mode 100644 hr_employee_updation/static/description/assets/icons/wrench.png create mode 100644 hr_employee_updation/static/description/banner.png create mode 100644 hr_employee_updation/static/description/icon.png create mode 100644 hr_employee_updation/static/description/images/appraisal_image.png create mode 100644 hr_employee_updation/static/description/images/bio_image.png create mode 100644 hr_employee_updation/static/description/images/checked.png create mode 100644 hr_employee_updation/static/description/images/core_image.gif create mode 100644 hr_employee_updation/static/description/images/hero.png create mode 100644 hr_employee_updation/static/description/images/module_image.gif create mode 100644 hr_employee_updation/static/description/images/openhrms.png create mode 100644 hr_employee_updation/static/description/images/salary_image.png create mode 100644 hr_employee_updation/static/description/images/shift_image.png create mode 100644 hr_employee_updation/static/description/images/updation1.png create mode 100644 hr_employee_updation/static/description/images/updation2.png create mode 100644 hr_employee_updation/static/description/images/updation3.png create mode 100644 hr_employee_updation/static/description/index.html create mode 100644 hr_employee_updation/views/contract_days_view.xml create mode 100644 hr_employee_updation/views/hr_employee_view.xml create mode 100644 hr_employee_updation/views/hr_notification.xml create mode 100644 hr_employee_updation/views/updation_config.xml (limited to 'hr_employee_updation') diff --git a/hr_employee_updation/README.md b/hr_employee_updation/README.md new file mode 100644 index 0000000..c832fba --- /dev/null +++ b/hr_employee_updation/README.md @@ -0,0 +1,16 @@ +Open HRMS Employee Info +----------------------- +Supporting Addon for Open HRMS, Added Advanced 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 + +Website: +https://www.openhrms.com +https://www.cybrosys.com diff --git a/hr_employee_updation/__init__.py b/hr_employee_updation/__init__.py new file mode 100644 index 0000000..9c6d6e0 --- /dev/null +++ b/hr_employee_updation/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +################################################################################### +# A part of Open HRMS Project +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies (). +# Author: Jesni Banu () +# +# 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/hr_employee_updation/__manifest__.py b/hr_employee_updation/__manifest__.py new file mode 100644 index 0000000..218e0fc --- /dev/null +++ b/hr_employee_updation/__manifest__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +################################################################################### +# A part of Open HRMS Project +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2020-TODAY Cybrosys Technologies (). +# Author: Jesni Banu () +# +# 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': 'Open HRMS Employee Info', + 'version': '14.0.1.0.0', + 'summary': """Adding Advanced 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,Open HRMS', + 'company': 'Cybrosys Techno Solutions', + 'website': "https://www.openhrms.com", + 'depends': ['base', 'hr', 'mail', 'hr_gamification', 'hr_contract'], + 'data': [ + 'security/ir.model.access.csv', + 'data/data.xml', + 'views/contract_days_view.xml', + 'views/updation_config.xml', + 'views/hr_employee_view.xml', + 'views/hr_notification.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/hr_employee_updation/data/data.xml b/hr_employee_updation/data/data.xml new file mode 100644 index 0000000..b18f58b --- /dev/null +++ b/hr_employee_updation/data/data.xml @@ -0,0 +1,14 @@ + + + + Spouse + + + + Father + + + + Mother + + diff --git a/hr_employee_updation/doc/RELEASE_NOTES.md b/hr_employee_updation/doc/RELEASE_NOTES.md new file mode 100644 index 0000000..9e56c28 --- /dev/null +++ b/hr_employee_updation/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 06.10.2020 +#### Version 14.0.1.0.0 +##### ADD +- Initial commit for Open HRMS Project diff --git a/hr_employee_updation/i18n/ar_001.po b/hr_employee_updation/i18n/ar_001.po new file mode 100644 index 0000000..6e4a266 --- /dev/null +++ b/hr_employee_updation/i18n/ar_001.po @@ -0,0 +1,248 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_updation +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-02-12 03:21+0000\n" +"PO-Revision-Date: 2020-02-12 03:21+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee__id_attachment_id +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee__passport_attachment_id +msgid "Attachment" +msgstr "المرفق" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_emergency_contact__relation +msgid "Contact" +msgstr "اتصل" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee_family__member_contact +msgid "Contact No" +msgstr "رقم الاتصال" + +#. module: hr_employee_updation +#: model:ir.model.fields,help:hr_employee_updation.field_hr_emergency_contact__number +msgid "Contact Number" +msgstr "رقم الاتصال" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_emergency_contact__create_uid +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee_family__create_uid +msgid "Created by" +msgstr "انشأ من قبل" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_emergency_contact__create_date +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee_family__create_date +msgid "Created on" +msgstr "تم إنشاؤها على" + +#. module: hr_employee_updation +#: model:ir.model.fields.selection,name:hr_employee_updation.selection__hr_employee_family__relation__daughter +msgid "Daughter" +msgstr "ابنة" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_emergency_contact__display_name +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee_family__display_name +msgid "Display Name" +msgstr "اسم العرض" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee__emergency_contacts +msgid "Emergency Contact" +msgstr "الاتصال بالطوارىء" + +#. module: hr_employee_updation +#: model_terms:ir.ui.view,arch_db:hr_employee_updation.hr_employee_inherit_form_view +msgid "Emergency Contacts" +msgstr "جهة اتصال للطوارئ" + +#. module: hr_employee_updation +#: model:ir.model,name:hr_employee_updation.model_hr_employee +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee_family__employee_id +msgid "Employee" +msgstr "الموظف" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_emergency_contact__employee_obj +msgid "Employee Obj" +msgstr "كائن الموظف" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee__id_expiry_date +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee__passport_expiry_date +msgid "Expiry Date" +msgstr "تاريخ الانتهاء" + +#. module: hr_employee_updation +#: model:ir.model.fields,help:hr_employee_updation.field_hr_employee__id_expiry_date +msgid "Expiry date of Identification ID" +msgstr "تاريخ انتهاء معرف الهوية" + +#. module: hr_employee_updation +#: model:ir.model.fields,help:hr_employee_updation.field_hr_employee__passport_expiry_date +msgid "Expiry date of Passport ID" +msgstr "تاريخ انتهاء صلاحية جواز السفر" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee__fam_ids +#: model_terms:ir.ui.view,arch_db:hr_employee_updation.hr_employee_inherit_form_view +msgid "Family" +msgstr "عائلة" + +#. module: hr_employee_updation +#: model:ir.model.fields,help:hr_employee_updation.field_hr_employee__fam_ids +#: model_terms:ir.ui.view,arch_db:hr_employee_updation.hr_employee_inherit_form_view +msgid "Family Information" +msgstr "معلومات العائلة" + +#. module: hr_employee_updation +#: model:ir.model.fields.selection,name:hr_employee_updation.selection__hr_employee_family__relation__father +msgid "Father" +msgstr "الآب" + +#. module: hr_employee_updation +#: model:ir.model,name:hr_employee_updation.model_hr_emergency_contact +msgid "HR Emergency Contact" +msgstr "الموارد البشرية في حالات الطوارئ الاتصال" + +#. module: hr_employee_updation +#: model:ir.actions.server,name:hr_employee_updation.employee_data_reminder_ir_actions_server +#: model:ir.cron,cron_name:hr_employee_updation.employee_data_reminder +#: model:ir.cron,name:hr_employee_updation.employee_data_reminder +msgid "HR Employee Data Expiration" +msgstr "موظف بيانات الموارد البشرية انتهاء الصلاحية" + +#. module: hr_employee_updation +#: model:ir.model,name:hr_employee_updation.model_hr_employee_family +msgid "HR Employee Family" +msgstr "عائلة موظف الموارد البشرية" + +#. module: hr_employee_updation +#: model:ir.ui.menu,name:hr_employee_updation.menu_hr_management +msgid "HR Management" +msgstr "إدارة الموارد البشرية" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_emergency_contact__id +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee_family__id +msgid "ID" +msgstr "هوية شخصية" + +#. module: hr_employee_updation +#: code:addons/hr_employee_updation/models/hr_employee.py:0 +#, python-format +msgid "ID-%s Expired On %s" +msgstr "انتهت صلاحية معرف ٪ s في ٪ s" + +#. module: hr_employee_updation +#: model_terms:ir.ui.view,arch_db:hr_employee_updation.hr_employee_inherit_form_view +msgid "Identification ID" +msgstr "معرف الهوية" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee__joining_date +msgid "Joining Date" +msgstr "تاريخ الانضمام" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_emergency_contact____last_update +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee_family____last_update +msgid "Last Modified on" +msgstr "آخر تعديل في" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_emergency_contact__write_uid +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee_family__write_uid +msgid "Last Updated by" +msgstr "آخر تحديث بواسطة" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_emergency_contact__write_date +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee_family__write_date +msgid "Last Updated on" +msgstr "آخر تحديث في" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee__personal_mobile +msgid "Mobile" +msgstr "التليفون المحمول" + +#. module: hr_employee_updation +#: model:ir.model.fields.selection,name:hr_employee_updation.selection__hr_employee_family__relation__mother +msgid "Mother" +msgstr "أم" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee_family__member_name +msgid "Name" +msgstr "اسم" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_emergency_contact__number +msgid "Number" +msgstr "رقم" + +#. module: hr_employee_updation +#: model_terms:ir.ui.view,arch_db:hr_employee_updation.hr_employee_inherit_form_view +msgid "Passport ID" +msgstr "رقم جواز السفر" + +#. module: hr_employee_updation +#: code:addons/hr_employee_updation/models/hr_employee.py:0 +#, python-format +msgid "Passport-%s Expired On %s" +msgstr "انتهت صلاحية جواز السفر ٪ s في ٪ s" + +#. module: hr_employee_updation +#: model:ir.model.fields,help:hr_employee_updation.field_hr_emergency_contact__relation +#: model:ir.model.fields,help:hr_employee_updation.field_hr_employee_family__relation +msgid "Relation with employee" +msgstr "العلاقة مع الموظف" + +#. module: hr_employee_updation +#: model:ir.model.fields,field_description:hr_employee_updation.field_hr_employee_family__relation +msgid "Relationship" +msgstr "صلة" + +#. module: hr_employee_updation +#: model:ir.ui.menu,name:hr_employee_updation.employee_report_menu +msgid "Reports" +msgstr "تقارير" + +#. module: hr_employee_updation +#: model:ir.model.fields,help:hr_employee_updation.field_hr_employee_family__employee_id +msgid "Select corresponding Employee" +msgstr "حدد الموظف المقابل" + +#. module: hr_employee_updation +#: model:ir.model.fields.selection,name:hr_employee_updation.selection__hr_employee_family__relation__son +msgid "Son" +msgstr "ابن" + +#. module: hr_employee_updation +#: model:ir.model.fields.selection,name:hr_employee_updation.selection__hr_employee_family__relation__wife +msgid "Wife" +msgstr "زوجة" + +#. module: hr_employee_updation +#: model:ir.model.fields,help:hr_employee_updation.field_hr_employee__passport_attachment_id +msgid "You can attach the copy of Passport" +msgstr "يمكنك إرفاق نسخة من جواز السفر" + +#. module: hr_employee_updation +#: model:ir.model.fields,help:hr_employee_updation.field_hr_employee__id_attachment_id +msgid "You can attach the copy of your Id" +msgstr "يمكنك إرفاق نسخة من هويتك" diff --git a/hr_employee_updation/models/__init__.py b/hr_employee_updation/models/__init__.py new file mode 100644 index 0000000..56e67b7 --- /dev/null +++ b/hr_employee_updation/models/__init__.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +################################################################################### +# A part of Open HRMS Project +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies (). +# Author: Jesni Banu () +# +# 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 hr_employee +from . import updation_config +from . import hr_contract_days + + + + diff --git a/hr_employee_updation/models/hr_contract_days.py b/hr_employee_updation/models/hr_contract_days.py new file mode 100644 index 0000000..11f161c --- /dev/null +++ b/hr_employee_updation/models/hr_contract_days.py @@ -0,0 +1,16 @@ +from odoo.exceptions import Warning +from odoo import models, fields, api, _ + + +class HrEmployeeContract(models.Model): + _inherit = 'hr.contract' + + def _get_default_notice_days(self): + if self.env['ir.config_parameter'].get_param( + 'hr_resignation.notice_period'): + return self.env['ir.config_parameter'].get_param( + 'hr_resignation.no_of_days') + else: + return 0 + + notice_days = fields.Integer(string="Notice Period", default=_get_default_notice_days) diff --git a/hr_employee_updation/models/hr_employee.py b/hr_employee_updation/models/hr_employee.py new file mode 100644 index 0000000..17a0185 --- /dev/null +++ b/hr_employee_updation/models/hr_employee.py @@ -0,0 +1,123 @@ +# -*- coding: utf-8 -*- +################################################################################### +# A part of Open HRMS Project +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies (). +# Author: Jesni Banu () +# +# 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 datetime, timedelta +from odoo import models, fields, _, api + +GENDER_SELECTION = [('male', 'Male'), + ('female', 'Female'), + ('other', 'Other')] + + +class HrEmployeeFamilyInfo(models.Model): + """Table for keep employee family information""" + + _name = 'hr.employee.family' + _description = 'HR Employee Family' + + employee_id = fields.Many2one('hr.employee', string="Employee", help='Select corresponding Employee', + invisible=1) + relation_id = fields.Many2one('hr.employee.relation', string="Relation", help="Relationship with the employee") + member_name = fields.Char(string='Name') + member_contact = fields.Char(string='Contact No') + birth_date = fields.Date(string="DOB", tracking=True) + + +class HrEmployee(models.Model): + _inherit = 'hr.employee' + + def mail_reminder(self): + """Sending expiry date notification for ID and Passport""" + + 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 + ",
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'].sudo().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 + ",
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'].sudo().create(main_content).send() + + personal_mobile = fields.Char(string='Mobile', related='address_home_id.mobile', store=True, + help="Personal mobile number of the employee") + joining_date = fields.Date(string='Joining Date', help="Employee joining date computed from the contract start date",compute='compute_joining', store=True) + id_expiry_date = fields.Date(string='Expiry Date', help='Expiry date of Identification ID') + passport_expiry_date = fields.Date(string='Expiry Date', help='Expiry date of Passport ID') + 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', help='Family Information') + + @api.depends('contract_id') + def compute_joining(self): + if self.contract_id: + date = min(self.contract_id.mapped('date_start')) + self.joining_date = date + else: + self.joining_date = False + + @api.onchange('spouse_complete_name', 'spouse_birthdate') + def onchange_spouse(self): + relation = self.env.ref('hr_employee_updation.employee_relationship') + lines_info = [] + spouse_name = self.spouse_complete_name + date = self.spouse_birthdate + if spouse_name and date: + lines_info.append((0, 0, { + 'member_name': spouse_name, + 'relation_id': relation.id, + 'birth_date': date, + }) + ) + self.fam_ids = [(6, 0, 0)] + lines_info + + +class EmployeeRelationInfo(models.Model): + """Table for keep employee family information""" + + _name = 'hr.employee.relation' + + name = fields.Char(string="Relationship", help="Relationship with thw employee") diff --git a/hr_employee_updation/models/updation_config.py b/hr_employee_updation/models/updation_config.py new file mode 100644 index 0000000..34a958d --- /dev/null +++ b/hr_employee_updation/models/updation_config.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import fields, models, api + + +class JournalConfig(models.TransientModel): + _inherit = ['res.config.settings'] + + notice_period = fields.Boolean(string='Notice Period') + no_of_days = fields.Integer() + + def set_values(self): + super(JournalConfig, self).set_values() + self.env['ir.config_parameter'].sudo().set_param("hr_resignation.notice_period", + self.notice_period) + self.env['ir.config_parameter'].sudo().set_param("hr_resignation.no_of_days", + self.no_of_days) + + @api.model + def get_values(self): + res = super(JournalConfig, self).get_values() + get_param = self.env['ir.config_parameter'].sudo().get_param + res['notice_period'] = get_param('hr_resignation.notice_period') + res['no_of_days'] = int(get_param('hr_resignation.no_of_days')) + return res + + # @api.onchange('service_expense_journal') + # def onchange_accounts(self): + # self.service_credit_account = self.service_expense_journal.default_credit_account_id.id + # self.service_debit_account = self.service_expense_journal.default_debit_account_id.id diff --git a/hr_employee_updation/security/ir.model.access.csv b/hr_employee_updation/security/ir.model.access.csv new file mode 100644 index 0000000..657a89f --- /dev/null +++ b/hr_employee_updation/security/ir.model.access.csv @@ -0,0 +1,5 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_hr_employee_family_employee","hr.employee.family_employee","model_hr_employee_family","base.group_user",1,0,0,0 +"access_hr_employee_family_manager","hr.employee.family_manager","model_hr_employee_family","hr.group_hr_manager",1,1,1,1 +"access_hr_employee_family_user","hr.employee.family_user","model_hr_employee_family","hr.group_hr_user",1,1,1,1 +access_hr_employee_relation,access_access_hr_employee_relation,model_hr_employee_relation,base.group_user,1,1,1,1 diff --git a/hr_employee_updation/static/description/assets/icons/chevron.png b/hr_employee_updation/static/description/assets/icons/chevron.png new file mode 100644 index 0000000..2089293 Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/chevron.png differ diff --git a/hr_employee_updation/static/description/assets/icons/cogs.png b/hr_employee_updation/static/description/assets/icons/cogs.png new file mode 100644 index 0000000..95d0bad Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/cogs.png differ diff --git a/hr_employee_updation/static/description/assets/icons/consultation.png b/hr_employee_updation/static/description/assets/icons/consultation.png new file mode 100644 index 0000000..8319d4b Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/consultation.png differ diff --git a/hr_employee_updation/static/description/assets/icons/ecom-black.png b/hr_employee_updation/static/description/assets/icons/ecom-black.png new file mode 100644 index 0000000..a9385ff Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/ecom-black.png differ diff --git a/hr_employee_updation/static/description/assets/icons/education-black.png b/hr_employee_updation/static/description/assets/icons/education-black.png new file mode 100644 index 0000000..3eb09b2 Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/education-black.png differ diff --git a/hr_employee_updation/static/description/assets/icons/hotel-black.png b/hr_employee_updation/static/description/assets/icons/hotel-black.png new file mode 100644 index 0000000..130f613 Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/hotel-black.png differ diff --git a/hr_employee_updation/static/description/assets/icons/license.png b/hr_employee_updation/static/description/assets/icons/license.png new file mode 100644 index 0000000..a586979 Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/license.png differ diff --git a/hr_employee_updation/static/description/assets/icons/lifebuoy.png b/hr_employee_updation/static/description/assets/icons/lifebuoy.png new file mode 100644 index 0000000..658d56c Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/lifebuoy.png differ diff --git a/hr_employee_updation/static/description/assets/icons/manufacturing-black.png b/hr_employee_updation/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 0000000..697eb0e Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/manufacturing-black.png differ diff --git a/hr_employee_updation/static/description/assets/icons/pos-black.png b/hr_employee_updation/static/description/assets/icons/pos-black.png new file mode 100644 index 0000000..97c0f90 Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/pos-black.png differ diff --git a/hr_employee_updation/static/description/assets/icons/puzzle.png b/hr_employee_updation/static/description/assets/icons/puzzle.png new file mode 100644 index 0000000..65cf854 Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/puzzle.png differ diff --git a/hr_employee_updation/static/description/assets/icons/restaurant-black.png b/hr_employee_updation/static/description/assets/icons/restaurant-black.png new file mode 100644 index 0000000..4a35eb9 Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/restaurant-black.png differ diff --git a/hr_employee_updation/static/description/assets/icons/service-black.png b/hr_employee_updation/static/description/assets/icons/service-black.png new file mode 100644 index 0000000..301ab51 Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/service-black.png differ diff --git a/hr_employee_updation/static/description/assets/icons/trading-black.png b/hr_employee_updation/static/description/assets/icons/trading-black.png new file mode 100644 index 0000000..9398ba2 Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/trading-black.png differ diff --git a/hr_employee_updation/static/description/assets/icons/training.png b/hr_employee_updation/static/description/assets/icons/training.png new file mode 100644 index 0000000..884ca02 Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/training.png differ diff --git a/hr_employee_updation/static/description/assets/icons/update.png b/hr_employee_updation/static/description/assets/icons/update.png new file mode 100644 index 0000000..ecbc5a0 Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/update.png differ diff --git a/hr_employee_updation/static/description/assets/icons/user.png b/hr_employee_updation/static/description/assets/icons/user.png new file mode 100644 index 0000000..6ffb23d Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/user.png differ diff --git a/hr_employee_updation/static/description/assets/icons/wrench.png b/hr_employee_updation/static/description/assets/icons/wrench.png new file mode 100644 index 0000000..6c04dea Binary files /dev/null and b/hr_employee_updation/static/description/assets/icons/wrench.png differ diff --git a/hr_employee_updation/static/description/banner.png b/hr_employee_updation/static/description/banner.png new file mode 100644 index 0000000..26e1032 Binary files /dev/null and b/hr_employee_updation/static/description/banner.png differ diff --git a/hr_employee_updation/static/description/icon.png b/hr_employee_updation/static/description/icon.png new file mode 100644 index 0000000..be05d31 Binary files /dev/null and b/hr_employee_updation/static/description/icon.png differ diff --git a/hr_employee_updation/static/description/images/appraisal_image.png b/hr_employee_updation/static/description/images/appraisal_image.png new file mode 100644 index 0000000..0823d44 Binary files /dev/null and b/hr_employee_updation/static/description/images/appraisal_image.png differ diff --git a/hr_employee_updation/static/description/images/bio_image.png b/hr_employee_updation/static/description/images/bio_image.png new file mode 100644 index 0000000..acc34b2 Binary files /dev/null and b/hr_employee_updation/static/description/images/bio_image.png differ diff --git a/hr_employee_updation/static/description/images/checked.png b/hr_employee_updation/static/description/images/checked.png new file mode 100644 index 0000000..c8e371f Binary files /dev/null and b/hr_employee_updation/static/description/images/checked.png differ diff --git a/hr_employee_updation/static/description/images/core_image.gif b/hr_employee_updation/static/description/images/core_image.gif new file mode 100644 index 0000000..814b0cf Binary files /dev/null and b/hr_employee_updation/static/description/images/core_image.gif differ diff --git a/hr_employee_updation/static/description/images/hero.png b/hr_employee_updation/static/description/images/hero.png new file mode 100644 index 0000000..a8abb41 Binary files /dev/null and b/hr_employee_updation/static/description/images/hero.png differ diff --git a/hr_employee_updation/static/description/images/module_image.gif b/hr_employee_updation/static/description/images/module_image.gif new file mode 100644 index 0000000..51be5f0 Binary files /dev/null and b/hr_employee_updation/static/description/images/module_image.gif differ diff --git a/hr_employee_updation/static/description/images/openhrms.png b/hr_employee_updation/static/description/images/openhrms.png new file mode 100644 index 0000000..068dcb8 Binary files /dev/null and b/hr_employee_updation/static/description/images/openhrms.png differ diff --git a/hr_employee_updation/static/description/images/salary_image.png b/hr_employee_updation/static/description/images/salary_image.png new file mode 100644 index 0000000..127ea73 Binary files /dev/null and b/hr_employee_updation/static/description/images/salary_image.png differ diff --git a/hr_employee_updation/static/description/images/shift_image.png b/hr_employee_updation/static/description/images/shift_image.png new file mode 100644 index 0000000..9d69782 Binary files /dev/null and b/hr_employee_updation/static/description/images/shift_image.png differ diff --git a/hr_employee_updation/static/description/images/updation1.png b/hr_employee_updation/static/description/images/updation1.png new file mode 100644 index 0000000..a980bf7 Binary files /dev/null and b/hr_employee_updation/static/description/images/updation1.png differ diff --git a/hr_employee_updation/static/description/images/updation2.png b/hr_employee_updation/static/description/images/updation2.png new file mode 100644 index 0000000..927a4db Binary files /dev/null and b/hr_employee_updation/static/description/images/updation2.png differ diff --git a/hr_employee_updation/static/description/images/updation3.png b/hr_employee_updation/static/description/images/updation3.png new file mode 100644 index 0000000..799073e Binary files /dev/null and b/hr_employee_updation/static/description/images/updation3.png differ diff --git a/hr_employee_updation/static/description/index.html b/hr_employee_updation/static/description/index.html new file mode 100644 index 0000000..29eda73 --- /dev/null +++ b/hr_employee_updation/static/description/index.html @@ -0,0 +1,535 @@ +
+
+ +
+
+

OpenHRMS + Employee Info

+

+ Added Advance Fields On Employee Master

+ +
+
+ + + +
+
+

Overview

+
+

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

+
+
+ + + + +
+
+

Key Features

+
+
+
+ +
+ +

+ Provision for family information +

+
+ +
+ +

+ Provision for joining date and contact info +

+
+ +
+ +

+ Provision for passport and id expiry date and attachments +

+
+ +
+ +

+ Provision for expiry notification for passport and id documents +

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

Screenshots

+
+ +
+
+

+ 01

+
+
+

Identification ID & + Passport ID +

+ +
+
+ + + +
+
+

+ 02

+
+
+

Family Information +

+ +
+
+ + + + +
+
+

+ 03

+
+
+

Joining Date

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

Suggested Products

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

Our Services

+
+
+ +
+
+ +
+
Odoo + Customization
+
+ +
+
+ +
+
Odoo + Implementation
+
+ +
+
+ +
+
Odoo + Support
+
+ + +
+
+ +
+
Hire + Odoo + Developer
+
+ +
+
+ +
+
Odoo + Integration
+
+ +
+
+ +
+
Odoo + Migration
+
+ + +
+
+ +
+
Odoo + Consultancy
+
+ +
+
+ +
+
Odoo + Implementation
+
+ +
+
+ +
+
Odoo + Licensing Consultancy
+
+
+
+ + + +
+
+
+

Our Industries

+
+
+ +
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

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

Need Help?

+
+
+
+ + +
+ +
+ +
+ +
+ WhatsApp +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + + +
+
s \ No newline at end of file diff --git a/hr_employee_updation/views/contract_days_view.xml b/hr_employee_updation/views/contract_days_view.xml new file mode 100644 index 0000000..1355018 --- /dev/null +++ b/hr_employee_updation/views/contract_days_view.xml @@ -0,0 +1,17 @@ + + + + hr.contract.notice.period + hr.contract + + + + + + + diff --git a/hr_employee_updation/views/hr_employee_view.xml b/hr_employee_updation/views/hr_employee_view.xml new file mode 100644 index 0000000..f1fcbdb --- /dev/null +++ b/hr_employee_updation/views/hr_employee_view.xml @@ -0,0 +1,72 @@ + + + + + + + + hr.employee.form.view + hr.employee + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + hr.employee.view.form.inherit + hr.employee + + + + +
+ +
+ +
+
+
+
+ +
+
\ No newline at end of file diff --git a/hr_employee_updation/views/hr_notification.xml b/hr_employee_updation/views/hr_notification.xml new file mode 100644 index 0000000..3dbfa7d --- /dev/null +++ b/hr_employee_updation/views/hr_notification.xml @@ -0,0 +1,15 @@ + + + + + HR Employee Data Expiration + 1 + days + -1 + + + code + model.mail_reminder() + + + diff --git a/hr_employee_updation/views/updation_config.xml b/hr_employee_updation/views/updation_config.xml new file mode 100644 index 0000000..c439221 --- /dev/null +++ b/hr_employee_updation/views/updation_config.xml @@ -0,0 +1,27 @@ + + + + journal.res.config.settings.view.form.inherit.hr.fleet + res.config.settings + + + + +
+
+ +
+
+
+
+
+
+
+
-- cgit v1.2.3