From 1ca3b3df3421961caec3b747a364071c80f5c7da Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 10 May 2022 17:14:58 +0700 Subject: initial commit --- hr_resignation/README.rst | 41 ++ hr_resignation/__init__.py | 2 + hr_resignation/__manifest__.py | 50 +++ hr_resignation/data/demo_data.xml | 23 + hr_resignation/data/resign_employee.xml | 16 + hr_resignation/docs/RELEASE_NOTES.md | 6 + hr_resignation/i18n/ar_001.po | 363 +++++++++++++++ hr_resignation/models/__init__.py | 2 + hr_resignation/models/hr_resignation.py | 187 ++++++++ hr_resignation/security/ir.model.access.csv | 3 + hr_resignation/security/security.xml | 19 + .../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_resignation/static/description/banner.png | Bin 0 -> 64376 bytes hr_resignation/static/description/icon.png | Bin 0 -> 17634 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 hr_resignation/static/description/images/hero.png | Bin 0 -> 343097 bytes .../static/description/images/module_image.gif | Bin 0 -> 140073 bytes .../description/images/open-hrms-resignation.gif | Bin 0 -> 911804 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 hr_resignation/static/description/index.html | 492 +++++++++++++++++++++ .../static/description/resignation_web.png | Bin 0 -> 8570 bytes .../static/image/resign_employee_id.jpeg | Bin 0 -> 5364 bytes hr_resignation/views/approved_resignation.xml | 25 ++ hr_resignation/views/hr_employee.xml | 25 ++ hr_resignation/views/resignation_sequence.xml | 15 + hr_resignation/views/resignation_view.xml | 91 ++++ 48 files changed, 1360 insertions(+) create mode 100644 hr_resignation/README.rst create mode 100644 hr_resignation/__init__.py create mode 100644 hr_resignation/__manifest__.py create mode 100644 hr_resignation/data/demo_data.xml create mode 100644 hr_resignation/data/resign_employee.xml create mode 100644 hr_resignation/docs/RELEASE_NOTES.md create mode 100644 hr_resignation/i18n/ar_001.po create mode 100644 hr_resignation/models/__init__.py create mode 100644 hr_resignation/models/hr_resignation.py create mode 100644 hr_resignation/security/ir.model.access.csv create mode 100644 hr_resignation/security/security.xml create mode 100644 hr_resignation/static/description/assets/icons/chevron.png create mode 100644 hr_resignation/static/description/assets/icons/cogs.png create mode 100644 hr_resignation/static/description/assets/icons/consultation.png create mode 100644 hr_resignation/static/description/assets/icons/ecom-black.png create mode 100644 hr_resignation/static/description/assets/icons/education-black.png create mode 100644 hr_resignation/static/description/assets/icons/hotel-black.png create mode 100644 hr_resignation/static/description/assets/icons/license.png create mode 100644 hr_resignation/static/description/assets/icons/lifebuoy.png create mode 100644 hr_resignation/static/description/assets/icons/manufacturing-black.png create mode 100644 hr_resignation/static/description/assets/icons/pos-black.png create mode 100644 hr_resignation/static/description/assets/icons/puzzle.png create mode 100644 hr_resignation/static/description/assets/icons/restaurant-black.png create mode 100644 hr_resignation/static/description/assets/icons/service-black.png create mode 100644 hr_resignation/static/description/assets/icons/trading-black.png create mode 100644 hr_resignation/static/description/assets/icons/training.png create mode 100644 hr_resignation/static/description/assets/icons/update.png create mode 100644 hr_resignation/static/description/assets/icons/user.png create mode 100644 hr_resignation/static/description/assets/icons/wrench.png create mode 100644 hr_resignation/static/description/banner.png create mode 100644 hr_resignation/static/description/icon.png create mode 100644 hr_resignation/static/description/images/appraisal_image.png create mode 100644 hr_resignation/static/description/images/bio_image.png create mode 100644 hr_resignation/static/description/images/checked.png create mode 100644 hr_resignation/static/description/images/core_image.gif create mode 100644 hr_resignation/static/description/images/hero.png create mode 100644 hr_resignation/static/description/images/module_image.gif create mode 100644 hr_resignation/static/description/images/open-hrms-resignation.gif create mode 100644 hr_resignation/static/description/images/openhrms.png create mode 100644 hr_resignation/static/description/images/salary_image.png create mode 100644 hr_resignation/static/description/images/shift_image.png create mode 100644 hr_resignation/static/description/index.html create mode 100644 hr_resignation/static/description/resignation_web.png create mode 100644 hr_resignation/static/image/resign_employee_id.jpeg create mode 100644 hr_resignation/views/approved_resignation.xml create mode 100644 hr_resignation/views/hr_employee.xml create mode 100644 hr_resignation/views/resignation_sequence.xml create mode 100644 hr_resignation/views/resignation_view.xml (limited to 'hr_resignation') diff --git a/hr_resignation/README.rst b/hr_resignation/README.rst new file mode 100644 index 0000000..4ab17bf --- /dev/null +++ b/hr_resignation/README.rst @@ -0,0 +1,41 @@ +OHRMS Employee Resignation +========================== + +Employee Resignation Process. + +Depends +======= +[hr_employee_updation] addon Open HRMS +[mail] addon Odoo + +Tech +==== +* [Python] - Models +* [XML] - Odoo views + +Installation +============ +- www.odoo.com/documentation/14.0/setup/install.html +- Install our custom addon + + +Bug Tracker +=========== +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Credits +======= +* Cybrosys Techno Solutions + +Author +------ + +Developer: Niyas Raphy @ cybrosys, odoo@cybrosys.com + Version 14: Naveen V @cybrosys, Contact: odoo@cybrosys.com + +Maintainer +---------- + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com. diff --git a/hr_resignation/__init__.py b/hr_resignation/__init__.py new file mode 100644 index 0000000..a0fdc10 --- /dev/null +++ b/hr_resignation/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import models diff --git a/hr_resignation/__manifest__.py b/hr_resignation/__manifest__.py new file mode 100644 index 0000000..c2f38f8 --- /dev/null +++ b/hr_resignation/__manifest__.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +################################################################################### +# A part of Open HRMS Project +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2020-TODAY Cybrosys Technologies (). +# Author: Niyas Raphy() +# +# 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 Resignation', + 'version': '14.0.1.0.0', + 'summary': 'Handle the resignation process of the employee', + 'live_test_url': 'https://www.youtube.com/watch?v=VuFWGXAdriU&feature=youtu.be', + 'author': 'Cybrosys Techno solutions,Open HRMS', + 'company': 'Cybrosys Techno Solutions', + 'website': 'https://www.openhrms.com', + 'depends': ['hr', 'hr_employee_updation', 'mail'], + 'category': 'Generic Modules/Human Resources', + 'maintainer': 'Cybrosys Techno Solutions', + 'demo': ['data/demo_data.xml'], + 'data': [ + 'security/security.xml', + 'security/ir.model.access.csv', + 'data/resign_employee.xml', + 'views/hr_employee.xml', + 'views/resignation_view.xml', + 'views/approved_resignation.xml', + 'views/resignation_sequence.xml', + ], + 'installable': True, + 'application': False, + 'auto_install': False, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', +} + diff --git a/hr_resignation/data/demo_data.xml b/hr_resignation/data/demo_data.xml new file mode 100644 index 0000000..73342c7 --- /dev/null +++ b/hr_resignation/data/demo_data.xml @@ -0,0 +1,23 @@ + + + + + + Sreejith Sasidharan + Odoo developer + Building 1, Third Floor + (376)-352-741 + sreejith@example.com + + + + + + 2015-03-02 + 2020-03-22 + Career Change + + + + \ No newline at end of file diff --git a/hr_resignation/data/resign_employee.xml b/hr_resignation/data/resign_employee.xml new file mode 100644 index 0000000..89930f0 --- /dev/null +++ b/hr_resignation/data/resign_employee.xml @@ -0,0 +1,16 @@ + + + + + HR Resignation: update employee + + code + model.update_employee_status() + + 1 + days + -1 + + + + \ No newline at end of file diff --git a/hr_resignation/docs/RELEASE_NOTES.md b/hr_resignation/docs/RELEASE_NOTES.md new file mode 100644 index 0000000..bcef6a9 --- /dev/null +++ b/hr_resignation/docs/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module hr_resignation + +#### 06.10.2020 +#### Version 14.0.1.0.0 +##### ADD +- Initial Commit \ No newline at end of file diff --git a/hr_resignation/i18n/ar_001.po b/hr_resignation/i18n/ar_001.po new file mode 100644 index 0000000..9c7cd44 --- /dev/null +++ b/hr_resignation/i18n/ar_001.po @@ -0,0 +1,363 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_resignation +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-02-12 03:50+0000\n" +"PO-Revision-Date: 2020-02-12 03:50+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_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__message_needaction +msgid "Action Needed" +msgstr "الإجراءات اللازمة" + +#. module: hr_resignation +#: model_terms:ir.ui.view,arch_db:hr_resignation.employee_resignation_form +msgid "Approve" +msgstr "يوافق" + +#. module: hr_resignation +#: model:ir.model.fields.selection,name:hr_resignation.selection__hr_resignation__state__approved +msgid "Approved" +msgstr "وافق" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__approved_revealing_date +msgid "Approved Date" +msgstr "تاريخ الموافقة" + +#. module: hr_resignation +#: model_terms:ir.actions.act_window,help:hr_resignation.view_approved_resignation +#: model:ir.actions.act_window,name:hr_resignation.view_approved_resignation +#: model:ir.ui.menu,name:hr_resignation.employee_resignation_approved +msgid "Approved Resignation" +msgstr "تمت الموافقة على الاستقالة" + +#. module: hr_resignation +#: code:addons/hr_resignation/models/hr_resignation.py:0 +#, python-format +msgid "Approved relieving date must be anterior to confirmed date" +msgstr "يجب أن يكون تاريخ التخفيف المعتمد هو الأمامي للتاريخ المؤكد" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__message_attachment_count +msgid "Attachment Count" +msgstr "عدد المرفقات" + +#. module: hr_resignation +#: model:ir.model.fields.selection,name:hr_resignation.selection__hr_resignation__state__cancel +#: model_terms:ir.ui.view,arch_db:hr_resignation.employee_resignation_form +msgid "Cancel" +msgstr "إلغاء" + +#. module: hr_resignation +#: model:ir.model.fields.selection,name:hr_resignation.selection__hr_resignation__state__confirm +#: model_terms:ir.ui.view,arch_db:hr_resignation.employee_resignation_form +msgid "Confirm" +msgstr "تؤكد" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__create_uid +msgid "Created by" +msgstr "انشأ من قبل" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__create_date +msgid "Created on" +msgstr "تم إنشاؤها على" + +#. module: hr_resignation +#: model:ir.model.fields,help:hr_resignation.field_hr_resignation__expected_revealing_date +msgid "Date on which he is revealing from the company" +msgstr "التاريخ الذي يكشف عنه من الشركة" + +#. module: hr_resignation +#: model:ir.model.fields,help:hr_resignation.field_hr_resignation__resign_confirm_date +msgid "Date on which the request is confirmed" +msgstr "تاريخ تأكيد الطلب" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__department_id +msgid "Department" +msgstr "قسم" + +#. module: hr_resignation +#: model:ir.model.fields,help:hr_resignation.field_hr_resignation__department_id +msgid "Department of the employee" +msgstr "قسم الموظف" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__display_name +msgid "Display Name" +msgstr "اسم العرض" + +#. module: hr_resignation +#: model:ir.model.fields.selection,name:hr_resignation.selection__hr_resignation__state__draft +msgid "Draft" +msgstr "مشروع" + +#. module: hr_resignation +#: model:ir.model,name:hr_resignation.model_hr_employee +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__employee_id +msgid "Employee" +msgstr "الموظف" + +#. module: hr_resignation +#: model:ir.actions.act_window,name:hr_resignation.view_employee_resignation +#: model_terms:ir.ui.view,arch_db:hr_resignation.employee_resignation_form +#: model_terms:ir.ui.view,arch_db:hr_resignation.employee_resignation_tree +msgid "Employee Resignation" +msgstr "استقالة الموظف" + +#. module: hr_resignation +#: model_terms:ir.actions.act_window,help:hr_resignation.view_employee_resignation +msgid "Employee Resignation Form" +msgstr "نموذج استقالة الموظف" + +#. module: hr_resignation +#: code:addons/hr_resignation/models/hr_resignation.py:0 +#, python-format +msgid "Enter Approved Relieving Date" +msgstr "أدخل تاريخ التخفيف المعتمد" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__message_follower_ids +msgid "Followers" +msgstr "متابعون" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__message_channel_ids +msgid "Followers (Channels)" +msgstr "(المتابعون (القنوات" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__message_partner_ids +msgid "Followers (Partners)" +msgstr "(المتابعون (الشركاء" + +#. module: hr_resignation +#: model:ir.actions.server,name:hr_resignation.ir_cron_data_employee_resignation_ir_actions_server +#: model:ir.cron,cron_name:hr_resignation.ir_cron_data_employee_resignation +#: model:ir.cron,name:hr_resignation.ir_cron_data_employee_resignation +msgid "HR Resignation: update employee" +msgstr "استقالة الموارد البشرية: تحديث الموظف" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__id +msgid "ID" +msgstr "هوية شخصية" + +#. module: hr_resignation +#: model:ir.model.fields,help:hr_resignation.field_hr_resignation__message_needaction +#: model:ir.model.fields,help:hr_resignation.field_hr_resignation__message_unread +msgid "If checked, new messages require your attention." +msgstr "إذا تم تحديد ذلك ، فإن الرسائل الجديدة تتطلب اهتمامك." + +#. module: hr_resignation +#: model:ir.model.fields,help:hr_resignation.field_hr_resignation__message_has_error +#: model:ir.model.fields,help:hr_resignation.field_hr_resignation__message_has_sms_error +msgid "If checked, some messages have a delivery error." +msgstr "إذا تم تحديده ، فبعض الرسائل بها خطأ في التسليم." + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__message_is_follower +msgid "Is Follower" +msgstr "هو تابع" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__joined_date +msgid "Join Date" +msgstr "تاريخ الانضمام" + +#. module: hr_resignation +#: model:ir.model.fields,help:hr_resignation.field_hr_resignation__joined_date +msgid "Joining date of the employee" +msgstr "تاريخ انضمام الموظف" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation____last_update +msgid "Last Modified on" +msgstr "آخر تعديل في" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__write_uid +msgid "Last Updated by" +msgstr "آخر تحديث بواسطة" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__write_date +msgid "Last Updated on" +msgstr "آخر تحديث في" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__message_main_attachment_id +msgid "Main Attachment" +msgstr "المرفق الرئيسي" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__message_has_error +msgid "Message Delivery error" +msgstr "خطأ في تسليم الرسالة" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__message_ids +msgid "Messages" +msgstr "رسائل" + +#. module: hr_resignation +#: model:ir.model.fields,help:hr_resignation.field_hr_resignation__employee_id +msgid "Name of the employee for whom the request is creating" +msgstr "اسم الموظف الذي يتم إنشاء الطلب له" + +#. module: hr_resignation +#: code:addons/hr_resignation/models/hr_resignation.py:0 +#: code:addons/hr_resignation/models/hr_resignation.py:0 +#: code:addons/hr_resignation/models/hr_resignation.py:0 +#, python-format +msgid "New" +msgstr "جديد" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__notice_period +msgid "Notice Period" +msgstr "فترة إشعار" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__message_needaction_counter +msgid "Number of Actions" +msgstr "عدد الإجراءات" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__message_has_error_counter +msgid "Number of errors" +msgstr "عدد الاخطاء" + +#. module: hr_resignation +#: model:ir.model.fields,help:hr_resignation.field_hr_resignation__message_needaction_counter +msgid "Number of messages which requires an action" +msgstr "عدد الرسائل التي تتطلب إجراء" + +#. module: hr_resignation +#: model:ir.model.fields,help:hr_resignation.field_hr_resignation__message_has_error_counter +msgid "Number of messages with delivery error" +msgstr "عدد الرسائل مع خطأ التسليم" + +#. module: hr_resignation +#: model:ir.model.fields,help:hr_resignation.field_hr_resignation__message_unread_counter +msgid "Number of unread messages" +msgstr "عدد الرسائل غير المقروءة" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__name +msgid "Order Reference" +msgstr "ترتيب المرجعي" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__reason +msgid "Reason" +msgstr "السبب" + +#. module: hr_resignation +#: model_terms:ir.ui.view,arch_db:hr_resignation.employee_resignation_form +msgid "Reject" +msgstr "رفض" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__expected_revealing_date +msgid "Relieving Date" +msgstr "تاريخ تخفيف" + +#. module: hr_resignation +#: code:addons/hr_resignation/models/hr_resignation.py:0 +#, python-format +msgid "Relieving date must be anterior to joining date" +msgstr "يجب أن يكون تاريخ التخفيف أمام تاريخ الانضمام" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_employee__resign_date +msgid "Resign Date" +msgstr "تاريخ الاستقالة" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__resign_confirm_date +msgid "Resign confirm date" +msgstr "استقالة تأكيد التاريخ" + +#. module: hr_resignation +#: model:ir.ui.menu,name:hr_resignation.employee_resignation +msgid "Resignation" +msgstr "استقالة" + +#. module: hr_resignation +#: model:ir.ui.menu,name:hr_resignation.employee_resignation_request +msgid "Resignation Request" +msgstr "طلب الاستقالة" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__message_has_sms_error +msgid "SMS Delivery error" +msgstr "خطأ في تسليم الرسائل القصيرة" + +#. module: hr_resignation +#: model:ir.model.fields,help:hr_resignation.field_hr_resignation__reason +msgid "Specify reason for leaving the company" +msgstr "تحديد سبب مغادرة الشركة" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__state +msgid "Status" +msgstr "الحالة" + +#. module: hr_resignation +#: model:ir.model.fields,help:hr_resignation.field_hr_resignation__approved_revealing_date +msgid "The date approved for the relieving" +msgstr "التاريخ المعتمد للتخفيف" + +#. module: hr_resignation +#: code:addons/hr_resignation/models/hr_resignation.py:0 +#: code:addons/hr_resignation/models/hr_resignation.py:0 +#, python-format +msgid "" +"There is a resignation request in confirmed or approved state for this " +"employee" +msgstr "هناك طلب استقالة في حالة مؤكدة أو معتمدة لهذا الموظف" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__message_unread +msgid "Unread Messages" +msgstr "رسائل غير مقروءة" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__message_unread_counter +msgid "Unread Messages Counter" +msgstr "عداد الرسائل غير المقروءة" + +#. module: hr_resignation +#: model:ir.model.fields,field_description:hr_resignation.field_hr_resignation__website_message_ids +msgid "Website Messages" +msgstr "رسائل الموقع" + +#. module: hr_resignation +#: model:ir.model.fields,help:hr_resignation.field_hr_resignation__website_message_ids +msgid "Website communication history" +msgstr "سجل اتصالات الموقع" + +#. module: hr_resignation +#: code:addons/hr_resignation/models/hr_resignation.py:0 +#, python-format +msgid "You cannot create request for other employees" +msgstr "لا يمكنك إنشاء طلب للموظفين الآخرين" + +#. module: hr_resignation +#: model:ir.model,name:hr_resignation.model_hr_resignation +msgid "hr.resignation" +msgstr "" diff --git a/hr_resignation/models/__init__.py b/hr_resignation/models/__init__.py new file mode 100644 index 0000000..fb9ec22 --- /dev/null +++ b/hr_resignation/models/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import hr_resignation diff --git a/hr_resignation/models/hr_resignation.py b/hr_resignation/models/hr_resignation.py new file mode 100644 index 0000000..d31a491 --- /dev/null +++ b/hr_resignation/models/hr_resignation.py @@ -0,0 +1,187 @@ +# -*- coding: utf-8 -*- +import datetime +from datetime import datetime, timedelta +from odoo import models, fields, api, _ +from odoo.exceptions import ValidationError + +date_format = "%Y-%m-%d" +RESIGNATION_TYPE = [('resigned', 'Normal Resignation'), + ('fired', 'Fired by the company')] + + +class HrResignation(models.Model): + _name = 'hr.resignation' + _inherit = 'mail.thread' + _rec_name = 'employee_id' + + name = fields.Char(string='Order Reference', required=True, copy=False, readonly=True, index=True, + default=lambda self: _('New')) + employee_id = fields.Many2one('hr.employee', string="Employee", default=lambda self: self.env.user.employee_id.id, + help='Name of the employee for whom the request is creating') + department_id = fields.Many2one('hr.department', string="Department", related='employee_id.department_id', + help='Department of the employee') + resign_confirm_date = fields.Date(string="Confirmed Date", + help='Date on which the request is confirmed by the employee.', + track_visibility="always") + approved_revealing_date = fields.Date(string="Approved Last Day Of Employee", + help='Date on which the request is confirmed by the manager.', + track_visibility="always") + joined_date = fields.Date(string="Join Date", store=True, + help='Joining date of the employee.i.e Start date of the first contract') + + expected_revealing_date = fields.Date(string="Last Day of Employee", required=True, + help='Employee requested date on which he is revealing from the company.') + reason = fields.Text(string="Reason", required=True, help='Specify reason for leaving the company') + notice_period = fields.Char(string="Notice Period") + state = fields.Selection( + [('draft', 'Draft'), ('confirm', 'Confirm'), ('approved', 'Approved'), ('cancel', 'Rejected')], + string='Status', default='draft', track_visibility="always") + resignation_type = fields.Selection(selection=RESIGNATION_TYPE, help="Select the type of resignation: normal " + "resignation or fired by the company") + read_only = fields.Boolean(string="check field") + employee_contract = fields.Char(String="Contract") + + @api.onchange('employee_id') + @api.depends('employee_id') + def _compute_read_only(self): + """ Use this function to check weather the user has the permission to change the employee""" + res_user = self.env['res.users'].search([('id', '=', self._uid)]) + print(res_user.has_group('hr.group_hr_user')) + if res_user.has_group('hr.group_hr_user'): + self.read_only = True + else: + self.read_only = False + + @api.onchange('employee_id') + def set_join_date(self): + # self.joined_date = self.employee_id.joining_date if self.employee_id.joining_date else '' + self.joined_date = self.employee_id.joining_date + + # @api.depends('employee_id') + # def compute_join_date(self): + # # self.joined_date = self.employee_id.joining_date if self.employee_id.joining_date else '' + # if employee_id.joining_date : + # self.joined_date = self.employee_id.joining_date + # else : + # self.joined_date = False + + @api.model + def create(self, vals): + # assigning the sequence for the record + if vals.get('name', _('New')) == _('New'): + vals['name'] = self.env['ir.sequence'].next_by_code('hr.resignation') or _('New') + res = super(HrResignation, self).create(vals) + return res + + @api.constrains('employee_id') + def check_employee(self): + # Checking whether the user is creating leave request of his/her own + for rec in self: + if not self.env.user.has_group('hr.group_hr_user'): + if rec.employee_id.user_id.id and rec.employee_id.user_id.id != self.env.uid: + raise ValidationError(_('You cannot create request for other employees')) + + @api.onchange('employee_id') + @api.depends('employee_id') + def check_request_existence(self): + # Check whether any resignation request already exists + for rec in self: + if rec.employee_id: + resignation_request = self.env['hr.resignation'].search([('employee_id', '=', rec.employee_id.id), + ('state', 'in', ['confirm', 'approved'])]) + if resignation_request: + raise ValidationError(_('There is a resignation request in confirmed or' + ' approved state for this employee')) + if rec.employee_id: + no_of_contract = self.env['hr.contract'].search([('employee_id', '=', self.employee_id.id)]) + for contracts in no_of_contract: + if contracts.state == 'open': + rec.employee_contract = contracts.name + rec.notice_period = contracts.notice_days + + @api.constrains('joined_date') + def _check_dates(self): + # validating the entered dates + for rec in self: + resignation_request = self.env['hr.resignation'].search([('employee_id', '=', rec.employee_id.id), + ('state', 'in', ['confirm', 'approved'])]) + if resignation_request: + raise ValidationError(_('There is a resignation request in confirmed or' + ' approved state for this employee')) + + def confirm_resignation(self): + if self.joined_date: + if self.joined_date >= self.expected_revealing_date: + raise ValidationError(_('Last date of the Employee must be anterior to Joining date')) + for rec in self: + rec.state = 'confirm' + rec.resign_confirm_date = str(datetime.now()) + else: + raise ValidationError(_('Please set joining date for employee')) + + def cancel_resignation(self): + for rec in self: + rec.state = 'cancel' + + def reject_resignation(self): + for rec in self: + rec.state = 'cancel' + + def reset_to_draft(self): + for rec in self: + rec.state = 'draft' + rec.employee_id.active = True + rec.employee_id.resigned = False + rec.employee_id.fired = False + + def approve_resignation(self): + for rec in self: + if rec.expected_revealing_date and rec.resign_confirm_date: + no_of_contract = self.env['hr.contract'].search([('employee_id', '=', self.employee_id.id)]) + for contracts in no_of_contract: + if contracts.state == 'open': + rec.employee_contract = contracts.name + rec.state = 'approved' + rec.approved_revealing_date = rec.resign_confirm_date + timedelta(days=contracts.notice_days) + else: + rec.approved_revealing_date = rec.expected_revealing_date + # Changing state of the employee if resigning today + if rec.expected_revealing_date <= fields.Date.today() and rec.employee_id.active: + rec.employee_id.active = False + # Changing fields in the employee table with respect to resignation + rec.employee_id.resign_date = rec.expected_revealing_date + if rec.resignation_type == 'resigned': + rec.employee_id.resigned = True + else: + rec.employee_id.fired = True + # Removing and deactivating user + if rec.employee_id.user_id: + rec.employee_id.user_id.active = False + rec.employee_id.user_id = None + else: + raise ValidationError(_('Please enter valid dates.')) + + def update_employee_status(self): + resignation = self.env['hr.resignation'].search([('state', '=', 'approved')]) + for rec in resignation: + if rec.expected_revealing_date <= fields.Date.today() and rec.employee_id.active: + rec.employee_id.active = False + # Changing fields in the employee table with respect to resignation + rec.employee_id.resign_date = rec.expected_revealing_date + if rec.resignation_type == 'resigned': + rec.employee_id.resigned = True + else: + rec.employee_id.fired = True + # Removing and deactivating user + if rec.employee_id.user_id: + rec.employee_id.user_id.active = False + rec.employee_id.user_id = None + + +class HrEmployee(models.Model): + _inherit = 'hr.employee' + + resign_date = fields.Date('Resign Date', readonly=True, help="Date of the resignation") + resigned = fields.Boolean(string="Resigned", default=False, store=True, + help="If checked then employee has resigned") + fired = fields.Boolean(string="Fired", default=False, store=True, help="If checked then employee has fired") diff --git a/hr_resignation/security/ir.model.access.csv b/hr_resignation/security/ir.model.access.csv new file mode 100644 index 0000000..62723a7 --- /dev/null +++ b/hr_resignation/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +view_hr_resignation,view.hr.resignation,hr_resignation.model_hr_resignation,base.group_user,1,1,1,0 +view_hr_employee,view.hr.employee,hr.model_hr_employee,base.group_user,1,1,1,0 diff --git a/hr_resignation/security/security.xml b/hr_resignation/security/security.xml new file mode 100644 index 0000000..79fcab7 --- /dev/null +++ b/hr_resignation/security/security.xml @@ -0,0 +1,19 @@ + + + + + + Employee Resignation User + + [('employee_id.user_id','=',user.id)] + + + + + Employee Resignation Manager + + ['|',('employee_id.user_id','!=',user.id),('employee_id.user_id','=',False)] + + + + diff --git a/hr_resignation/static/description/assets/icons/chevron.png b/hr_resignation/static/description/assets/icons/chevron.png new file mode 100644 index 0000000..2089293 Binary files /dev/null and b/hr_resignation/static/description/assets/icons/chevron.png differ diff --git a/hr_resignation/static/description/assets/icons/cogs.png b/hr_resignation/static/description/assets/icons/cogs.png new file mode 100644 index 0000000..95d0bad Binary files /dev/null and b/hr_resignation/static/description/assets/icons/cogs.png differ diff --git a/hr_resignation/static/description/assets/icons/consultation.png b/hr_resignation/static/description/assets/icons/consultation.png new file mode 100644 index 0000000..8319d4b Binary files /dev/null and b/hr_resignation/static/description/assets/icons/consultation.png differ diff --git a/hr_resignation/static/description/assets/icons/ecom-black.png b/hr_resignation/static/description/assets/icons/ecom-black.png new file mode 100644 index 0000000..a9385ff Binary files /dev/null and b/hr_resignation/static/description/assets/icons/ecom-black.png differ diff --git a/hr_resignation/static/description/assets/icons/education-black.png b/hr_resignation/static/description/assets/icons/education-black.png new file mode 100644 index 0000000..3eb09b2 Binary files /dev/null and b/hr_resignation/static/description/assets/icons/education-black.png differ diff --git a/hr_resignation/static/description/assets/icons/hotel-black.png b/hr_resignation/static/description/assets/icons/hotel-black.png new file mode 100644 index 0000000..130f613 Binary files /dev/null and b/hr_resignation/static/description/assets/icons/hotel-black.png differ diff --git a/hr_resignation/static/description/assets/icons/license.png b/hr_resignation/static/description/assets/icons/license.png new file mode 100644 index 0000000..a586979 Binary files /dev/null and b/hr_resignation/static/description/assets/icons/license.png differ diff --git a/hr_resignation/static/description/assets/icons/lifebuoy.png b/hr_resignation/static/description/assets/icons/lifebuoy.png new file mode 100644 index 0000000..658d56c Binary files /dev/null and b/hr_resignation/static/description/assets/icons/lifebuoy.png differ diff --git a/hr_resignation/static/description/assets/icons/manufacturing-black.png b/hr_resignation/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 0000000..697eb0e Binary files /dev/null and b/hr_resignation/static/description/assets/icons/manufacturing-black.png differ diff --git a/hr_resignation/static/description/assets/icons/pos-black.png b/hr_resignation/static/description/assets/icons/pos-black.png new file mode 100644 index 0000000..97c0f90 Binary files /dev/null and b/hr_resignation/static/description/assets/icons/pos-black.png differ diff --git a/hr_resignation/static/description/assets/icons/puzzle.png b/hr_resignation/static/description/assets/icons/puzzle.png new file mode 100644 index 0000000..65cf854 Binary files /dev/null and b/hr_resignation/static/description/assets/icons/puzzle.png differ diff --git a/hr_resignation/static/description/assets/icons/restaurant-black.png b/hr_resignation/static/description/assets/icons/restaurant-black.png new file mode 100644 index 0000000..4a35eb9 Binary files /dev/null and b/hr_resignation/static/description/assets/icons/restaurant-black.png differ diff --git a/hr_resignation/static/description/assets/icons/service-black.png b/hr_resignation/static/description/assets/icons/service-black.png new file mode 100644 index 0000000..301ab51 Binary files /dev/null and b/hr_resignation/static/description/assets/icons/service-black.png differ diff --git a/hr_resignation/static/description/assets/icons/trading-black.png b/hr_resignation/static/description/assets/icons/trading-black.png new file mode 100644 index 0000000..9398ba2 Binary files /dev/null and b/hr_resignation/static/description/assets/icons/trading-black.png differ diff --git a/hr_resignation/static/description/assets/icons/training.png b/hr_resignation/static/description/assets/icons/training.png new file mode 100644 index 0000000..884ca02 Binary files /dev/null and b/hr_resignation/static/description/assets/icons/training.png differ diff --git a/hr_resignation/static/description/assets/icons/update.png b/hr_resignation/static/description/assets/icons/update.png new file mode 100644 index 0000000..ecbc5a0 Binary files /dev/null and b/hr_resignation/static/description/assets/icons/update.png differ diff --git a/hr_resignation/static/description/assets/icons/user.png b/hr_resignation/static/description/assets/icons/user.png new file mode 100644 index 0000000..6ffb23d Binary files /dev/null and b/hr_resignation/static/description/assets/icons/user.png differ diff --git a/hr_resignation/static/description/assets/icons/wrench.png b/hr_resignation/static/description/assets/icons/wrench.png new file mode 100644 index 0000000..6c04dea Binary files /dev/null and b/hr_resignation/static/description/assets/icons/wrench.png differ diff --git a/hr_resignation/static/description/banner.png b/hr_resignation/static/description/banner.png new file mode 100644 index 0000000..2e9bf81 Binary files /dev/null and b/hr_resignation/static/description/banner.png differ diff --git a/hr_resignation/static/description/icon.png b/hr_resignation/static/description/icon.png new file mode 100644 index 0000000..57e6c32 Binary files /dev/null and b/hr_resignation/static/description/icon.png differ diff --git a/hr_resignation/static/description/images/appraisal_image.png b/hr_resignation/static/description/images/appraisal_image.png new file mode 100644 index 0000000..0823d44 Binary files /dev/null and b/hr_resignation/static/description/images/appraisal_image.png differ diff --git a/hr_resignation/static/description/images/bio_image.png b/hr_resignation/static/description/images/bio_image.png new file mode 100644 index 0000000..acc34b2 Binary files /dev/null and b/hr_resignation/static/description/images/bio_image.png differ diff --git a/hr_resignation/static/description/images/checked.png b/hr_resignation/static/description/images/checked.png new file mode 100644 index 0000000..c8e371f Binary files /dev/null and b/hr_resignation/static/description/images/checked.png differ diff --git a/hr_resignation/static/description/images/core_image.gif b/hr_resignation/static/description/images/core_image.gif new file mode 100644 index 0000000..814b0cf Binary files /dev/null and b/hr_resignation/static/description/images/core_image.gif differ diff --git a/hr_resignation/static/description/images/hero.png b/hr_resignation/static/description/images/hero.png new file mode 100644 index 0000000..908fdfd Binary files /dev/null and b/hr_resignation/static/description/images/hero.png differ diff --git a/hr_resignation/static/description/images/module_image.gif b/hr_resignation/static/description/images/module_image.gif new file mode 100644 index 0000000..51be5f0 Binary files /dev/null and b/hr_resignation/static/description/images/module_image.gif differ diff --git a/hr_resignation/static/description/images/open-hrms-resignation.gif b/hr_resignation/static/description/images/open-hrms-resignation.gif new file mode 100644 index 0000000..c9595d7 Binary files /dev/null and b/hr_resignation/static/description/images/open-hrms-resignation.gif differ diff --git a/hr_resignation/static/description/images/openhrms.png b/hr_resignation/static/description/images/openhrms.png new file mode 100644 index 0000000..068dcb8 Binary files /dev/null and b/hr_resignation/static/description/images/openhrms.png differ diff --git a/hr_resignation/static/description/images/salary_image.png b/hr_resignation/static/description/images/salary_image.png new file mode 100644 index 0000000..127ea73 Binary files /dev/null and b/hr_resignation/static/description/images/salary_image.png differ diff --git a/hr_resignation/static/description/images/shift_image.png b/hr_resignation/static/description/images/shift_image.png new file mode 100644 index 0000000..9d69782 Binary files /dev/null and b/hr_resignation/static/description/images/shift_image.png differ diff --git a/hr_resignation/static/description/index.html b/hr_resignation/static/description/index.html new file mode 100644 index 0000000..62216f7 --- /dev/null +++ b/hr_resignation/static/description/index.html @@ -0,0 +1,492 @@ +
+
+ +
+
+

OpenHRMS + Resignation

+

+ Easily create, manage, and track employee resignations.

+ +
+
+ + + +
+
+

Overview

+
+

+ Employee Resignation is a component of Open HRMS suit. This module manages employee resignation + process. Employee can fill and send resignation request from their portal and higher level + officers can take appropriate actions on it. +

+
+
+ + + + +
+
+

Key Features

+
+
+
+ +
+ +

+ Employee will create his/her resignation request +

+
+ +
+ +

+ Higher level officers can approve or reject the request +

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

Screenshots

+
+ +
+
+

+ 01

+
+
+

Working of HR + resignation module +

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

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 +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + + +
+
\ No newline at end of file diff --git a/hr_resignation/static/description/resignation_web.png b/hr_resignation/static/description/resignation_web.png new file mode 100644 index 0000000..de95a41 Binary files /dev/null and b/hr_resignation/static/description/resignation_web.png differ diff --git a/hr_resignation/static/image/resign_employee_id.jpeg b/hr_resignation/static/image/resign_employee_id.jpeg new file mode 100644 index 0000000..c55e3f6 Binary files /dev/null and b/hr_resignation/static/image/resign_employee_id.jpeg differ diff --git a/hr_resignation/views/approved_resignation.xml b/hr_resignation/views/approved_resignation.xml new file mode 100644 index 0000000..ddfa5e1 --- /dev/null +++ b/hr_resignation/views/approved_resignation.xml @@ -0,0 +1,25 @@ + + + + + + Approved Resignation + hr.resignation + tree,form + [('state', '=', 'approved')] + +

Approved Resignation +

+
+
+ + +
+
+ + diff --git a/hr_resignation/views/hr_employee.xml b/hr_resignation/views/hr_employee.xml new file mode 100644 index 0000000..f2b0ebd --- /dev/null +++ b/hr_resignation/views/hr_employee.xml @@ -0,0 +1,25 @@ + + + + hr.employee.form.view + hr.employee + + + + + + + + + + hr.employee.form.filter + hr.employee + + + + + + + + + \ No newline at end of file diff --git a/hr_resignation/views/resignation_sequence.xml b/hr_resignation/views/resignation_sequence.xml new file mode 100644 index 0000000..65ee9ee --- /dev/null +++ b/hr_resignation/views/resignation_sequence.xml @@ -0,0 +1,15 @@ + + + + + + + Open HRMS Resignation + hr.resignation + RES + 3 + + + + + diff --git a/hr_resignation/views/resignation_view.xml b/hr_resignation/views/resignation_view.xml new file mode 100644 index 0000000..356e190 --- /dev/null +++ b/hr_resignation/views/resignation_view.xml @@ -0,0 +1,91 @@ + + + + + hr.resignation.tree + hr.resignation + + + + + + + + + + + + + + + + + hr.resignation.form + hr.resignation + + +
+
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + +
+
+ + +
+
+
+
+ + Employee Resignation + hr.resignation + tree,form + [('state', 'in', ('draft', 'confirm','cancel'))] + +

Employee Resignation Form +

+
+
+ + +
+
+ + -- cgit v1.2.3