From 1691056468728ea382c2fc89be5b954cfe7c49d0 Mon Sep 17 00:00:00 2001 From: younes Date: Tue, 15 Jul 2025 11:44:21 +0100 Subject: [PATCH 01/25] restrict check-in outside allowed working hours --- odex25_hr/attendances/i18n/ar_001.po | 12 +----------- odex25_hr/attendances/models/hr_attendance.py | 2 -- odex25_hr/attendances/views/hr_attendance_view.xml | 8 +------- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/odex25_hr/attendances/i18n/ar_001.po b/odex25_hr/attendances/i18n/ar_001.po index fc74b3c58..fae51a1aa 100644 --- a/odex25_hr/attendances/i18n/ar_001.po +++ b/odex25_hr/attendances/i18n/ar_001.po @@ -2809,14 +2809,4 @@ msgstr "" #. module: attendances #: model_terms:ir.ui.view,arch_db:attendances.late_attendance_report_template msgid "وقت الدخول" -msgstr "" - -#. module: attendances -#: model:ir.model.fields,field_description:attendances.field_resource_calendar__grace_hour_before_work -msgid "Grace Hours Before Work" -msgstr "ساعات السماحية قبل الدوم" - -#. module: attendances -#: model:ir.model.fields,field_description:attendances.field_resource_calendar__grace_hour_after_work -msgid "Grace Hours After Work" -msgstr "ساعات السماحية بعد الدوام" \ No newline at end of file +msgstr "" \ No newline at end of file diff --git a/odex25_hr/attendances/models/hr_attendance.py b/odex25_hr/attendances/models/hr_attendance.py index 889d39ebb..06886bb90 100644 --- a/odex25_hr/attendances/models/hr_attendance.py +++ b/odex25_hr/attendances/models/hr_attendance.py @@ -89,8 +89,6 @@ class HrAttendances(models.Model): full_end_sign_in = fields.Float(string='End Sign In') full_start_sign_out = fields.Float(string='Start Sign Out') full_end_sign_out = fields.Float(string='End Sign Out') - grace_hour_before_work = fields.Float(string="Grace Hours Before Work") - grace_hour_after_work = fields.Float(string="Grace Hours After Work") working_hours = fields.Float(string='Working Hours') working_days = fields.Integer(string='Working Days') break_duration = fields.Float("Break Duration", default=0.0) diff --git a/odex25_hr/attendances/views/hr_attendance_view.xml b/odex25_hr/attendances/views/hr_attendance_view.xml index ad66ea883..d9cfc10c0 100644 --- a/odex25_hr/attendances/views/hr_attendance_view.xml +++ b/odex25_hr/attendances/views/hr_attendance_view.xml @@ -68,7 +68,7 @@ 'invisible':[('is_full_day','=',False)], 'readonly': [('state', '!=', 'draft')]}"/> - + - - - - - - From 6def15c7043f371cb65438a2c06490c3ee0a1d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= <23265754+expsa@users.noreply.github.com> Date: Sun, 20 Jul 2025 15:04:03 +0300 Subject: [PATCH 07/25] Update github action file --- .github/workflows/dev-preprod-servers.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev-preprod-servers.yml b/.github/workflows/dev-preprod-servers.yml index d86cbb29d..d623f0d34 100644 --- a/.github/workflows/dev-preprod-servers.yml +++ b/.github/workflows/dev-preprod-servers.yml @@ -66,7 +66,7 @@ jobs: run: | sudo chmod +x /home/${{ secrets.CLIENT_USER }}/scripts/pull/preprod_pull_standard_code.sh sudo /home/${{ secrets.CLIENT_USER }}/scripts/pull/preprod_pull_standard_code.sh - sudo systemctl restart ${{ secrets.ENSAN_APP_PREPROD_SERVICE }} ${{ secrets.ODEX25_GENERAL_PREPROD_SERVICE }} ${{ secrets.ODEX25_STANDARD_PREPROD_SERVICE }} ${{ secrets.TWAHOD_APP_PREPROD_SERVICE }} ${{ secrets.ODEX25_DEMO_PREPROD_SERVICE }} ${{ secrets.HELPDESK_PREPROD_SERVICE }} ${{ secrets.CYBER_APP_PREPROD_SERVICE }} + sudo systemctl restart ${{ secrets.ENSAN_APP_PREPROD_SERVICE }} ${{ secrets.ODEX25_GENERAL_PREPROD_SERVICE }} ${{ secrets.ODEX25_STANDARD_PREPROD_SERVICE }} ${{ secrets.TWAHOD_APP_PREPROD_SERVICE }} ${{ secrets.ODEX25_DEMO_PREPROD_SERVICE }} ${{ secrets.HELPDESK_PREPROD_SERVICE }} ${{ secrets.CYBER_APP_PREPROD_SERVICE }} ${{ secrets.JAZALA_APP_PREPROD_SERVICE }} if [ $? -eq 0 ]; then echo "** [INFO] "PREPROD" services have been restarted." else @@ -82,7 +82,7 @@ jobs: run: | sudo chmod +x /home/${{ secrets.CLIENT_USER }}/scripts/pull/dev_pull_standard_code.sh sudo /home/${{ secrets.CLIENT_USER }}/scripts/pull/dev_pull_standard_code.sh - sudo systemctl restart ${{ secrets.ENSAN_APP_TEST_SERVICE }} ${{ secrets.ODEX25_GENERAL_TEST_SERVICE }} ${{ secrets.ODEX25_STANDARD_TEST_SERVICE }} ${{ secrets.TWAHOD_APP_TEST_SERVICE }} ${{ secrets.HELPDESK_TEST_SERVICE }} ${{ secrets.KAZ_LIBRARY_TEST_SERVICE }} ${{ secrets.CYBER_APP_TEST_SERVICE }} + sudo systemctl restart ${{ secrets.ENSAN_APP_TEST_SERVICE }} ${{ secrets.ODEX25_GENERAL_TEST_SERVICE }} ${{ secrets.ODEX25_STANDARD_TEST_SERVICE }} ${{ secrets.TWAHOD_APP_TEST_SERVICE }} ${{ secrets.HELPDESK_TEST_SERVICE }} ${{ secrets.KAZ_LIBRARY_TEST_SERVICE }} ${{ secrets.CYBER_APP_TEST_SERVICE }} ${{ secrets.JAZALA_APP_TEST_SERVICE }} if [ $? -eq 0 ]; then echo "** [INFO] "DEV" services have been restarted." else From 3aa266427881f9594e6b4d272a37a2f4020b0979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= <23265754+expsa@users.noreply.github.com> Date: Sun, 20 Jul 2025 16:35:34 +0300 Subject: [PATCH 08/25] Update github action file --- .github/workflows/production_pull_code.yml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/production_pull_code.yml b/.github/workflows/production_pull_code.yml index 016a1d8d0..47f2e2bc9 100644 --- a/.github/workflows/production_pull_code.yml +++ b/.github/workflows/production_pull_code.yml @@ -201,4 +201,27 @@ jobs: sudo ${{ secrets.SAHLI_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh ${{ secrets.SAHLI_PROJECT_USER }} ${{ secrets.SAHLI_STANDARD_FOLDER_PATH }} ${{ secrets.SAHLI_STAGE_MASTER_SERVICE }} master ${GITHUB_REF#refs/heads/master_} ${GITHUB_REF#refs/heads/} ${{ secrets.GH_TOKEN }} +# Jazala project + jazala_master_server: + name: Deploy to Jazala Master + runs-on: jazala-client-project-runner + if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Jazala-Project' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' || github.ref == 'refs/heads/master_odex25_ensan') && + (github.actor == 'moutazmuhammad' || + github.actor == 'expsa' || + github.actor == 'ahmadaking' || + github.actor == 'ronozoro' || + github.actor == 'SamirLADOUI-sa' || + github.actor == 'Abubaker-Altaib' || + github.actor == 'abdurrahman-saber' || + github.actor == 'altexp' || + github.actor == 'kchyounes19' || + github.actor == 'mohammed-alkhazrji') + steps: + - name: Checkout And Restart Project + run: | + echo "** [INFO] Running on branch --> ${GITHUB_REF#refs/heads/}" + mkdir -p ~/master_branch_sha + echo "$(date '+%Y-%m-%d %H:%M:%S') - ${{ github.sha }}" >> ~/master_branch_sha/${GITHUB_REF#refs/heads/} + sudo chmod +x ${{ secrets.JAZALA_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh + sudo ${{ secrets.JAZALA_STANDARD_FOLDER_PATH }}/scripts/pull_code.sh ${{ secrets.JAZALA_PROJECT_USER }} ${{ secrets.JAZALA_STANDARD_FOLDER_PATH }} ${{ secrets.JAZALA_MASTER_SERVICE }} master ${GITHUB_REF#refs/heads/master_} ${GITHUB_REF#refs/heads/} ${{ secrets.GH_TOKEN }} From 09eeed4e7267bbccda7eb924d26eb15f52fbf258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= <23265754+expsa@users.noreply.github.com> Date: Sun, 20 Jul 2025 16:44:04 +0300 Subject: [PATCH 09/25] Update github action file --- .github/workflows/production_pull_code.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/production_pull_code.yml b/.github/workflows/production_pull_code.yml index 47f2e2bc9..4fe1f53af 100644 --- a/.github/workflows/production_pull_code.yml +++ b/.github/workflows/production_pull_code.yml @@ -16,6 +16,7 @@ on: - Ekram-Project - Sahli-Project - Sahli-Stage-Project + - Jazala-Project jobs: # Cyber Project From c7abaa35d3e8d89323fea4a479b57814fa6fca00 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Tue, 22 Jul 2025 11:11:29 +0100 Subject: [PATCH 10/25] [FIX] employee_requests --- odex25_hr/employee_requests/i18n/ar_001.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odex25_hr/employee_requests/i18n/ar_001.po b/odex25_hr/employee_requests/i18n/ar_001.po index 872a10f93..40673688a 100644 --- a/odex25_hr/employee_requests/i18n/ar_001.po +++ b/odex25_hr/employee_requests/i18n/ar_001.po @@ -3487,7 +3487,7 @@ msgid "Submit" msgstr "إرســـال" #. module: employee_requests -#:model:ir.model.fields.selection,name:employee_requests.selection__hr_personal_permission_type__approval_by__direct_manager +#: model:ir.model.fields.selection,name:employee_requests.selection__hr_personal_permission_type__approval_by__direct_manager #: model_terms:ir.ui.view,arch_db:employee_requests.employee_clearance_form_form_view msgid "Direct Manager" msgstr "موافقة المدير المباشر" From 01725b321bc4c304f310d074c69327e2f1222fdb Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Tue, 22 Jul 2025 11:11:46 +0100 Subject: [PATCH 11/25] [FIX] hr_loans_salary_advance --- .../views/loan_request_type_view.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/odex25_hr/hr_loans_salary_advance/views/loan_request_type_view.xml b/odex25_hr/hr_loans_salary_advance/views/loan_request_type_view.xml index ffa2f616c..7da5f97ef 100644 --- a/odex25_hr/hr_loans_salary_advance/views/loan_request_type_view.xml +++ b/odex25_hr/hr_loans_salary_advance/views/loan_request_type_view.xml @@ -95,7 +95,12 @@ + groups="hr_loans_salary_advance.group_loan_user,hr_loans_salary_advance.group_loan_manager"/>0 + + + + + From 6e11bd77ec4c5ab4d39e2104f533ccb3848d58fb Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Wed, 23 Jul 2025 08:57:24 +0100 Subject: [PATCH 12/25] [FIX] employee_requests --- odex25_hr/employee_requests/i18n/ar_001.po | 53 +--------------------- 1 file changed, 2 insertions(+), 51 deletions(-) diff --git a/odex25_hr/employee_requests/i18n/ar_001.po b/odex25_hr/employee_requests/i18n/ar_001.po index 40673688a..4a4f4e087 100644 --- a/odex25_hr/employee_requests/i18n/ar_001.po +++ b/odex25_hr/employee_requests/i18n/ar_001.po @@ -396,13 +396,11 @@ msgstr "بند الصرف" msgid "Accounting" msgstr "الحسابات" - - #. module: employee_requests #: model:ir.model.fields,field_description:employee_requests.field_hr_classification__name #: model_terms:ir.ui.view,arch_db:employee_requests.view_hr_classification_form -msgid "Name" -msgstr "الاسم " +msgid "الاسم" +msgstr "" #. module: employee_requests #: model:ir.model.fields,field_description:employee_requests.field_hr_classification__active @@ -416,51 +414,12 @@ msgstr "نشط " msgid "HR Classification" msgstr "التصنيف" - - -#. module: employee_requests -#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__name -msgid "Classification" -msgstr "التصنيف" - - - -#. module: employee_requests -#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__name -msgid "Name" -msgstr "الاسم " - -#. module: employee_requests -#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__active -msgid "Active" -msgstr "نشط " - -#. module: employee_requests -#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__name -msgid "Classification" -msgstr "التصنيف" - - - -#. module: employee_requests -#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__name -msgid "Name" -msgstr "الاسم " - -#. module: employee_requests -#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__active -msgid "Active" -msgstr "نشط " - - - #. module: employee_requests #: model:ir.actions.act_window,name:employee_requests.employee_hr_classification_actionn #: model:ir.ui.menu,name:employee_requests.hr_classification_menu_item msgid "HR Classifications" msgstr "إعداد التصنيف" - #. module: employee_requests #: model:ir.model.fields,field_description:employee_requests.field_employee_department_jobs__message_needaction #: model:ir.model.fields,field_description:employee_requests.field_employee_effective_form__message_needaction @@ -1444,7 +1403,6 @@ msgstr "طلبات الموظفين" #. module: employee_requests #: code:addons/employee_requests/models/house_allowance_advance.py:0 #: code:addons/employee_requests/models/hr_personal_permission.py:0 -#: code:addons/employee_requests/models/hr_personal_permission.py:0 #, python-format msgid "End Date must be greater than Start Date" msgstr "تاريخ البداية يجب ان يكون قبل تاريخ النهاية" @@ -2479,7 +2437,6 @@ msgstr "مكان استخراج المستند" #. module: employee_requests #: code:addons/employee_requests/models/other_request.py:0 -#: code:addons/employee_requests/models/other_request.py:0 #, python-format msgid "Please Insert Attachments Files Below!" msgstr "فضلا يجب ارفاق صورة المؤهلات او الشهادات ادناه!" @@ -2492,7 +2449,6 @@ msgstr "فضلا لم يتم ادخال المعاليين" #. module: employee_requests #: code:addons/employee_requests/models/other_request.py:0 -#: code:addons/employee_requests/models/other_request.py:0 #, python-format msgid "Please The qualification or certification were not Insert Below!" msgstr "فضلا لم يتم ادخال المؤهلات او الشهادات ادناه!" @@ -2796,14 +2752,12 @@ msgstr "هذا الموظف فعليا في إستئذان خلال هذا ال #. module: employee_requests #: code:addons/employee_requests/models/hr_personal_permission.py:0 -#: code:addons/employee_requests/models/hr_personal_permission.py:0 #, python-format msgid "Sorry You Have Used All Your Permission Hours In This Month" msgstr "تم استخدام كل ساعات الإستئذان المسموح بها خلال هذا الشهر" #. module: employee_requests #: code:addons/employee_requests/models/hr_personal_permission.py:0 -#: code:addons/employee_requests/models/hr_personal_permission.py:0 #, python-format msgid "" "Sorry You Have Used All Your Permission In This Day you have one permission " @@ -2818,7 +2772,6 @@ msgstr "لايمكن الطلب بدون ادراج موظفين" #. module: employee_requests #: code:addons/employee_requests/models/employee_department_jobs.py:0 -#: code:addons/employee_requests/models/employee_department_jobs.py:0 #, python-format msgid "Sorry, It Must Be Approved By The %s Manager" msgstr "للأسف, يجب تصديقها من المدير %s" @@ -2981,7 +2934,6 @@ msgstr "تم إرجاع الهواتف / هواتف IP" #. module: employee_requests #: code:addons/employee_requests/models/hr_clearance_form.py:0 -#: code:addons/employee_requests/models/hr_clearance_form.py:0 #, python-format msgid "The Clearance to be completed after the Bank Clearance Attachment" msgstr "يجب ارفاق مستند إخلاء طرف البنك اولآ" @@ -3315,7 +3267,6 @@ msgstr "لايمكن الغاء القيدالمحاسبي %s اذا كان في #: code:addons/employee_requests/models/employee_department_jobs.py:0 #: code:addons/employee_requests/models/employee_effective_form.py:0 #: code:addons/employee_requests/models/employee_overtime_request.py:0 -#: code:addons/employee_requests/models/employee_overtime_request.py:0 #: code:addons/employee_requests/models/house_allowance_advance.py:0 #: code:addons/employee_requests/models/hr_clearance_form.py:0 #: code:addons/employee_requests/models/hr_personal_permission.py:0 From 4616aa0ca2e1406513a8ecd299293bf721390fa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= <23265754+expsa@users.noreply.github.com> Date: Wed, 23 Jul 2025 11:42:54 +0300 Subject: [PATCH 13/25] Update github action file --- .github/workflows/production_pull_code.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/production_pull_code.yml b/.github/workflows/production_pull_code.yml index 4fe1f53af..91c3e0acd 100644 --- a/.github/workflows/production_pull_code.yml +++ b/.github/workflows/production_pull_code.yml @@ -37,7 +37,7 @@ jobs: ensan_master_server: name: Deploy to Ensan Master runs-on: ensan-client-project-runner - if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Ensan-Project' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' || github.ref == 'refs/heads/master_odex25_ensan') && + if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Ensan-Project' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_helpdesk' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' || github.ref == 'refs/heads/master_odex25_ensan') && (github.actor == 'moutazmuhammad' || github.actor == 'expsa' || github.actor == 'ahmadaking' || @@ -61,7 +61,7 @@ jobs: helpdesk_maser_server: name: Deploy to Helpdesk Master runs-on: helpdesk_server - if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Helpdesk-Khabir-Project' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' || github.ref == 'refs/heads/master_odex25_ensan') && + if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Helpdesk-Khabir-Project' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' || github.ref == 'refs/heads/master_odex25_ensan' || github.ref == 'refs/heads/master_odex25_helpdesk') && (github.actor == 'moutazmuhammad' || github.actor == 'expsa' || github.actor == 'ahmadaking' || @@ -85,7 +85,7 @@ jobs: kaz_master_server: name: Deploy to KAZ Master runs-on: kaz-library-project-runner - if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'King-AbdelAziz-Library-Project' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' || github.ref == 'refs/heads/master_odex25_ensan') && + if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'King-AbdelAziz-Library-Project' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_helpdesk' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' || github.ref == 'refs/heads/master_odex25_ensan') && (github.actor == 'moutazmuhammad' || github.actor == 'expsa' || github.actor == 'ahmadaking' || @@ -110,7 +110,7 @@ jobs: twahod_master_server: name: Deploy to Twahod Master runs-on: twahod-client-project-runner - if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Twahod-Project' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' || github.ref == 'refs/heads/master_odex25_ensan') && + if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Twahod-Project' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_helpdesk' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' || github.ref == 'refs/heads/master_odex25_ensan') && (github.actor == 'moutazmuhammad' || github.actor == 'expsa' || github.actor == 'ahmadaking' || @@ -134,7 +134,7 @@ jobs: ekram_master_server: name: Deploy to Ekram Master runs-on: ekram-client-project-runner - if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Ekram-Project' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' || github.ref == 'refs/heads/master_odex25_ensan') && + if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Ekram-Project' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_helpdesk' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' || github.ref == 'refs/heads/master_odex25_ensan') && (github.actor == 'moutazmuhammad' || github.actor == 'expsa' || github.actor == 'ahmadaking' || @@ -158,7 +158,7 @@ jobs: sahli_prod_master_server: name: Deploy to Sahli Prod Master runs-on: sahli-client-project-runner - if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Sahli-Project' && (github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_project') && + if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Sahli-Project' && (github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_helpdesk' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_project') && (github.actor == 'moutazmuhammad' || github.actor == 'expsa' || github.actor == 'ahmadaking' || @@ -181,7 +181,7 @@ jobs: sahli_stage_master_server: name: Deploy to Sahli Stage Master runs-on: sahli-client-project-runner - if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Sahli-Stage-Project' && (github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_project') && + if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Sahli-Stage-Project' && (github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_helpdesk' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_project') && (github.actor == 'moutazmuhammad' || github.actor == 'expsa' || github.actor == 'ahmadaking' || @@ -206,7 +206,7 @@ jobs: jazala_master_server: name: Deploy to Jazala Master runs-on: jazala-client-project-runner - if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Jazala-Project' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' || github.ref == 'refs/heads/master_odex25_ensan') && + if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Jazala-Project' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_helpdesk' || github.ref == 'refs/heads/master_odex25_ENSAN' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' || github.ref == 'refs/heads/master_odex25_ensan') && (github.actor == 'moutazmuhammad' || github.actor == 'expsa' || github.actor == 'ahmadaking' || From 49d8dc64cf71809afbbfed279cb5013b6b47ffa7 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Wed, 23 Jul 2025 13:45:57 +0100 Subject: [PATCH 14/25] [UPD] hr_base_reports --- odex25_hr/hr_base_reports/i18n/ar_001.po | 8 ++--- .../report/handover_report_template.xml | 29 +++++++++++++++---- .../hr_base_reports/report/handover_reprt.py | 18 +++++++----- 3 files changed, 37 insertions(+), 18 deletions(-) diff --git a/odex25_hr/hr_base_reports/i18n/ar_001.po b/odex25_hr/hr_base_reports/i18n/ar_001.po index 11157d0ff..d4fd2d737 100644 --- a/odex25_hr/hr_base_reports/i18n/ar_001.po +++ b/odex25_hr/hr_base_reports/i18n/ar_001.po @@ -382,8 +382,8 @@ msgstr "تاريخ السلفة" #: code:addons/hr_base_reports/report/handover_reprt.py:0 #: model_terms:ir.ui.view,arch_db:hr_base_reports.employee_handover_report #, python-format -msgid "Date of Resignation" -msgstr "تاريخ الاستقالة" +msgid "Date of Request" +msgstr "تاريخ الطلب" #. module: hr_base_reports #: model_terms:ir.ui.view,arch_db:hr_base_reports.form_hr_leave_report_wizard @@ -698,7 +698,7 @@ msgstr "تقرير عام" #: model_terms:ir.ui.view,arch_db:hr_base_reports.employee_handover_report #, python-format msgid "Employee Handover Report" -msgstr "تقرير الإستقالات" +msgstr "تقرير الإستقالات ونهاية الخدمة" #. module: hr_base_reports #: code:addons/hr_base_reports/report/absence_execuse.py:0 @@ -992,7 +992,7 @@ msgstr "التسليم والتسلم" #. module: hr_base_reports #: model:ir.ui.menu,name:hr_base_reports.employee_handover_report_menu msgid "Handover Report" -msgstr "تقرير الإستقالات" +msgstr "تقرير الإستقالات ونهاية الخدمة" #. module: hr_base_reports #: code:addons/hr_base_reports/wizard/overtime_report.py:0 diff --git a/odex25_hr/hr_base_reports/report/handover_report_template.xml b/odex25_hr/hr_base_reports/report/handover_report_template.xml index 53948b054..4453430eb 100644 --- a/odex25_hr/hr_base_reports/report/handover_report_template.xml +++ b/odex25_hr/hr_base_reports/report/handover_report_template.xml @@ -26,9 +26,9 @@ Employee Name Job Title Department - Join Date Reason of Resignation - Date of Resignation + Date of Request + Join Date Last Date Location Line Manager @@ -54,14 +54,14 @@ - - - - + + + + @@ -81,12 +81,29 @@ + + Employee Handover Paperformat + + A4 + 0 + 0 + Landscape + 40 + 32 + 7 + 7 + + 35 + 90 + + hr.termination Employee Handover Report qweb-pdf hr_base_reports.employee_handover_report hr_base_reports.employee_handover_report + hr.termination diff --git a/odex25_hr/hr_base_reports/report/handover_reprt.py b/odex25_hr/hr_base_reports/report/handover_reprt.py index 82f86ca77..70b6b9d24 100644 --- a/odex25_hr/hr_base_reports/report/handover_reprt.py +++ b/odex25_hr/hr_base_reports/report/handover_reprt.py @@ -8,22 +8,25 @@ class EmployeeHandoverReport(models.AbstractModel): _description = 'Employee Handover Report' def get_result(self, data=None): + HrEmployee = self.env['hr.employee'].sudo() + HrTermination = self.env['hr.termination'].sudo() form = data['form'] employees = False - li = [] domain = [] if form['employee_ids']: - employees = self.env['hr.employee'].sudo().browse(form['employee_ids']) + employees = HrEmployee.browse(form['employee_ids']) else: if form['department_ids'] and not form['employee_ids']: domain = [('department_id', 'in', form['department_ids'])] - # domain += [('state','=','open')] - employees = self.env['hr.employee'].sudo().search(domain) + domain += [('active', 'in', [True, False])] + employees = HrEmployee.search(domain) + if not employees: + return HrTermination value = [('last_work_date', '>=', form['date_from']), ('create_date', '<=', form['date_to']), ('state', '!=', 'refused')] if employees: value += [('employee_id', 'in', employees.ids)] - records = self.env['hr.termination'].sudo().search(value) + records = HrTermination.search(value) records = records.sorted(key=lambda r: r.department_id.id) return records @@ -67,9 +70,8 @@ class EmployeeHandoverReportXlsx(models.AbstractModel): clm = 0 for res in [ (_('#')), (_('Employee ID')), (_('Employee Name')), (_('Job Title')), - (_('Department')), (_('Join Date')), (_('Reason of Resignation')), (_('Date of Resignation')), - (_('Last Date')), - (_('Location')), (_('Line Manager'))]: + (_('Department')), (_('Reason of Resignation')), (_('Date of Request')), (_('Join Date')), + (_('Last Date')), (_('Location')), (_('Line Manager'))]: sheet.write(row, clm, res, format0) clm += 1 row = 10 From 32633353d8801232a2dcffa44731dec73acdabbc Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Wed, 23 Jul 2025 14:32:47 +0100 Subject: [PATCH 15/25] [FIX] hr_base_reports --- odex25_hr/hr_base_reports/report/handover_reprt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odex25_hr/hr_base_reports/report/handover_reprt.py b/odex25_hr/hr_base_reports/report/handover_reprt.py index 70b6b9d24..4afcdc47d 100644 --- a/odex25_hr/hr_base_reports/report/handover_reprt.py +++ b/odex25_hr/hr_base_reports/report/handover_reprt.py @@ -84,9 +84,9 @@ class EmployeeHandoverReportXlsx(models.AbstractModel): sheet.write(row, clm + 2, rec.employee_id.name, format1) sheet.write(row, clm + 3, rec.job_id.name, format1) sheet.write(row, clm + 4, rec.employee_id.department_id.name, format1) - sheet.write(row, clm + 5, str(rec.first_hire_date), format1) sheet.write(row, clm + 6, rec.reason, format1) sheet.write(row, clm + 7, str(rec.create_date), format1) + sheet.write(row, clm + 5, str(rec.first_hire_date), format1) sheet.write(row, clm + 8, str(rec.last_work_date), format1) sheet.write(row, clm + 9, rec.employee_id.working_location.name, format1) sheet.write(row, clm + 10, rec.employee_id.parent_id.name, format1) From 9f203995dbffcdae1654bdb3018c74be0250b247 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Wed, 23 Jul 2025 15:08:12 +0100 Subject: [PATCH 16/25] [FIX] hr_base_reports --- odex25_hr/hr_base_reports/report/handover_reprt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/odex25_hr/hr_base_reports/report/handover_reprt.py b/odex25_hr/hr_base_reports/report/handover_reprt.py index 4afcdc47d..5324dd500 100644 --- a/odex25_hr/hr_base_reports/report/handover_reprt.py +++ b/odex25_hr/hr_base_reports/report/handover_reprt.py @@ -84,9 +84,9 @@ class EmployeeHandoverReportXlsx(models.AbstractModel): sheet.write(row, clm + 2, rec.employee_id.name, format1) sheet.write(row, clm + 3, rec.job_id.name, format1) sheet.write(row, clm + 4, rec.employee_id.department_id.name, format1) - sheet.write(row, clm + 6, rec.reason, format1) - sheet.write(row, clm + 7, str(rec.create_date), format1) - sheet.write(row, clm + 5, str(rec.first_hire_date), format1) + sheet.write(row, clm + 5, rec.reason, format1) + sheet.write(row, clm + 6, str(rec.create_date), format1) + sheet.write(row, clm + 7, str(rec.first_hire_date), format1) sheet.write(row, clm + 8, str(rec.last_work_date), format1) sheet.write(row, clm + 9, rec.employee_id.working_location.name, format1) sheet.write(row, clm + 10, rec.employee_id.parent_id.name, format1) From 0492a8027093ccc6469de8d58cb3f3d84fbea992 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Wed, 23 Jul 2025 15:52:33 +0100 Subject: [PATCH 17/25] [UPD] hr_base --- odex25_hr/hr_base/__manifest__.py | 1 + odex25_hr/hr_base/models/__init__.py | 1 + odex25_hr/hr_base/models/hr_holidays.py | 7 +++++ odex25_hr/hr_base/views/hr_holidays_views.xml | 26 +++++++++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 odex25_hr/hr_base/models/hr_holidays.py create mode 100644 odex25_hr/hr_base/views/hr_holidays_views.xml diff --git a/odex25_hr/hr_base/__manifest__.py b/odex25_hr/hr_base/__manifest__.py index e3acb4721..15ec9cd48 100644 --- a/odex25_hr/hr_base/__manifest__.py +++ b/odex25_hr/hr_base/__manifest__.py @@ -48,6 +48,7 @@ "views/hr_penalty_register_view.xml", "views/employee_iqama_document_view.xml", "views/res_users_views.xml", + "views/hr_holidays_views.xml", "views/menus_view.xml", # "views/res_config_settings.xml", 'report/hr_layout.xml', diff --git a/odex25_hr/hr_base/models/__init__.py b/odex25_hr/hr_base/models/__init__.py index 3c195ed03..0919fa58a 100644 --- a/odex25_hr/hr_base/models/__init__.py +++ b/odex25_hr/hr_base/models/__init__.py @@ -31,3 +31,4 @@ from . import assets_document from . import hr_department from . import res_partner from . import res_users +from . import hr_holidays diff --git a/odex25_hr/hr_base/models/hr_holidays.py b/odex25_hr/hr_base/models/hr_holidays.py new file mode 100644 index 000000000..beaecee78 --- /dev/null +++ b/odex25_hr/hr_base/models/hr_holidays.py @@ -0,0 +1,7 @@ +from odoo import models, fields + + +class HrHolidays(models.Model): + _inherit = 'hr.holidays' + + emp_no = fields.Char(related='employee_id.emp_no') \ No newline at end of file diff --git a/odex25_hr/hr_base/views/hr_holidays_views.xml b/odex25_hr/hr_base/views/hr_holidays_views.xml new file mode 100644 index 000000000..24e67a108 --- /dev/null +++ b/odex25_hr/hr_base/views/hr_holidays_views.xml @@ -0,0 +1,26 @@ + + + + + hr.holidays.allocation.tree.inherit + hr.holidays + + + + + + + + + + hr.holidays.tree.inherit + hr.holidays + + + + + + + + + From f8bfc11d42fdcd2b1eed945d256d6546b8811a7c Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Wed, 23 Jul 2025 15:53:05 +0100 Subject: [PATCH 18/25] [UPD] hr_holidays_community --- .../views/hr_holidays_views.xml | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/odex25_hr/hr_holidays_community/views/hr_holidays_views.xml b/odex25_hr/hr_holidays_community/views/hr_holidays_views.xml index 01a8e89cf..e2270108f 100644 --- a/odex25_hr/hr_holidays_community/views/hr_holidays_views.xml +++ b/odex25_hr/hr_holidays_community/views/hr_holidays_views.xml @@ -137,22 +137,24 @@ hr.holidays.allocation.tree hr.holidays - - - - - + + + + + - - + + - @@ -181,7 +183,9 @@ hr.holidays 20 - + @@ -276,7 +280,9 @@ hr.holidays.tree hr.holidays - @@ -284,7 +290,7 @@ - + @@ -520,7 +526,7 @@ Click here to create a new leave request.

- [('holiday_type','=','employee')] + [('holiday_type', '=', 'employee'), ('type', '=', 'add')] From a86570a175ea6801663561e3edf3961419873d29 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Wed, 23 Jul 2025 15:53:46 +0100 Subject: [PATCH 19/25] [UPD] hr_holidays_public --- odex25_hr/hr_holidays_public/views/hr_holidays_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odex25_hr/hr_holidays_public/views/hr_holidays_view.xml b/odex25_hr/hr_holidays_public/views/hr_holidays_view.xml index 1abbdcc5f..e322d1493 100644 --- a/odex25_hr/hr_holidays_public/views/hr_holidays_view.xml +++ b/odex25_hr/hr_holidays_public/views/hr_holidays_view.xml @@ -243,7 +243,7 @@ 1 - + From b87d3cb933de22893df8a5844d5d32744675a56b Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Wed, 23 Jul 2025 15:59:49 +0100 Subject: [PATCH 20/25] [FIX] hr_base_reports --- odex25_hr/hr_base_reports/report/handover_reprt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odex25_hr/hr_base_reports/report/handover_reprt.py b/odex25_hr/hr_base_reports/report/handover_reprt.py index 5324dd500..0d15a8e25 100644 --- a/odex25_hr/hr_base_reports/report/handover_reprt.py +++ b/odex25_hr/hr_base_reports/report/handover_reprt.py @@ -84,8 +84,8 @@ class EmployeeHandoverReportXlsx(models.AbstractModel): sheet.write(row, clm + 2, rec.employee_id.name, format1) sheet.write(row, clm + 3, rec.job_id.name, format1) sheet.write(row, clm + 4, rec.employee_id.department_id.name, format1) - sheet.write(row, clm + 5, rec.reason, format1) - sheet.write(row, clm + 6, str(rec.create_date), format1) + sheet.write(row, clm + 5, rec.cause_type.name, format1) + sheet.write(row, clm + 6, rec.create_date.strftime('%Y-%m-%d'), format1) sheet.write(row, clm + 7, str(rec.first_hire_date), format1) sheet.write(row, clm + 8, str(rec.last_work_date), format1) sheet.write(row, clm + 9, rec.employee_id.working_location.name, format1) From 4aa5391a6bfb25fdd94e130f5922c5aa4ca525b3 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Thu, 24 Jul 2025 01:14:54 +0100 Subject: [PATCH 21/25] [FIX] hr_base --- odex25_hr/hr_base/__manifest__.py | 1 - odex25_hr/hr_base/models/__init__.py | 1 - odex25_hr/hr_base/models/hr_holidays.py | 7 ----- odex25_hr/hr_base/views/hr_holidays_views.xml | 26 ------------------- 4 files changed, 35 deletions(-) delete mode 100644 odex25_hr/hr_base/models/hr_holidays.py delete mode 100644 odex25_hr/hr_base/views/hr_holidays_views.xml diff --git a/odex25_hr/hr_base/__manifest__.py b/odex25_hr/hr_base/__manifest__.py index 15ec9cd48..e3acb4721 100644 --- a/odex25_hr/hr_base/__manifest__.py +++ b/odex25_hr/hr_base/__manifest__.py @@ -48,7 +48,6 @@ "views/hr_penalty_register_view.xml", "views/employee_iqama_document_view.xml", "views/res_users_views.xml", - "views/hr_holidays_views.xml", "views/menus_view.xml", # "views/res_config_settings.xml", 'report/hr_layout.xml', diff --git a/odex25_hr/hr_base/models/__init__.py b/odex25_hr/hr_base/models/__init__.py index 0919fa58a..3c195ed03 100644 --- a/odex25_hr/hr_base/models/__init__.py +++ b/odex25_hr/hr_base/models/__init__.py @@ -31,4 +31,3 @@ from . import assets_document from . import hr_department from . import res_partner from . import res_users -from . import hr_holidays diff --git a/odex25_hr/hr_base/models/hr_holidays.py b/odex25_hr/hr_base/models/hr_holidays.py deleted file mode 100644 index beaecee78..000000000 --- a/odex25_hr/hr_base/models/hr_holidays.py +++ /dev/null @@ -1,7 +0,0 @@ -from odoo import models, fields - - -class HrHolidays(models.Model): - _inherit = 'hr.holidays' - - emp_no = fields.Char(related='employee_id.emp_no') \ No newline at end of file diff --git a/odex25_hr/hr_base/views/hr_holidays_views.xml b/odex25_hr/hr_base/views/hr_holidays_views.xml deleted file mode 100644 index 24e67a108..000000000 --- a/odex25_hr/hr_base/views/hr_holidays_views.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - hr.holidays.allocation.tree.inherit - hr.holidays - - - - - - - - - - hr.holidays.tree.inherit - hr.holidays - - - - - - - - - From 84cff45c65cfffe6e43d88e011f406a50c95cb4d Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Thu, 24 Jul 2025 01:15:32 +0100 Subject: [PATCH 22/25] [FIX] hr_holidays_community --- .../views/hr_holidays_views.xml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/odex25_hr/hr_holidays_community/views/hr_holidays_views.xml b/odex25_hr/hr_holidays_community/views/hr_holidays_views.xml index e2270108f..6bd6fb537 100644 --- a/odex25_hr/hr_holidays_community/views/hr_holidays_views.xml +++ b/odex25_hr/hr_holidays_community/views/hr_holidays_views.xml @@ -137,9 +137,7 @@ hr.holidays.allocation.tree hr.holidays - @@ -183,9 +181,7 @@ hr.holidays 20 - + @@ -280,9 +276,7 @@ hr.holidays.tree hr.holidays - @@ -290,7 +284,7 @@ - + @@ -526,7 +520,7 @@ Click here to create a new leave request.

- [('holiday_type', '=', 'employee'), ('type', '=', 'add')] + [('holiday_type','=','employee')] From ad82eaa83860ebc4937fee8015e5a78db6a93914 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Thu, 24 Jul 2025 01:15:51 +0100 Subject: [PATCH 23/25] [UPD] hr_holidays_public --- .../views/hr_holidays_view.xml | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/odex25_hr/hr_holidays_public/views/hr_holidays_view.xml b/odex25_hr/hr_holidays_public/views/hr_holidays_view.xml index e322d1493..a0628cebb 100644 --- a/odex25_hr/hr_holidays_public/views/hr_holidays_view.xml +++ b/odex25_hr/hr_holidays_public/views/hr_holidays_view.xml @@ -214,11 +214,47 @@ + + hr.holidays.allocation.tree.inherit + hr.holidays + + + + state in ['confirm', 'validate'] + state == 'validate1' + + + + + + + + + hr.holidays.allocation.tree.inherit + hr.holidays + + + + state in ['confirm', 'validate'] + state == 'validate1' + + + + hr.holidays.tree.custom hr.holidays + + state in ['confirm', 'validate'] + state == 'validate1' + + + number_of_days_temp + 1 + + date @@ -231,6 +267,9 @@ + + + @@ -273,5 +312,9 @@ + + + + From e8c02293a5fd5499088cdfd8761cc6202dc30ff5 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Thu, 24 Jul 2025 09:58:37 +0100 Subject: [PATCH 24/25] [FIX] hr_holidays_public --- .../hr_holidays_public/views/hr_holidays_view.xml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/odex25_hr/hr_holidays_public/views/hr_holidays_view.xml b/odex25_hr/hr_holidays_public/views/hr_holidays_view.xml index a0628cebb..2af6c0873 100644 --- a/odex25_hr/hr_holidays_public/views/hr_holidays_view.xml +++ b/odex25_hr/hr_holidays_public/views/hr_holidays_view.xml @@ -219,7 +219,8 @@ hr.holidays - + + badge state in ['confirm', 'validate'] state == 'validate1' @@ -234,7 +235,8 @@ hr.holidays - + + badge state in ['confirm', 'validate'] state == 'validate1' @@ -246,7 +248,8 @@ hr.holidays - + + badge state in ['confirm', 'validate'] state == 'validate1' @@ -314,7 +317,7 @@ - + From a3378e19a9cf2cce7386c47ee2083e967c10659e Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Sun, 27 Jul 2025 09:23:24 +0100 Subject: [PATCH 25/25] [UPD] hr_base --- odex25_hr/hr_base/data/ir_sequence.xml | 2 +- odex25_hr/hr_base/models/hr_base.py | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/odex25_hr/hr_base/data/ir_sequence.xml b/odex25_hr/hr_base/data/ir_sequence.xml index e03a3f2d5..2d8d7f74d 100644 --- a/odex25_hr/hr_base/data/ir_sequence.xml +++ b/odex25_hr/hr_base/data/ir_sequence.xml @@ -13,7 +13,7 @@ employee_sequence_emp_no hr.employee - 5 + 1 diff --git a/odex25_hr/hr_base/models/hr_base.py b/odex25_hr/hr_base/models/hr_base.py index 92be6a316..c768d96e1 100644 --- a/odex25_hr/hr_base/models/hr_base.py +++ b/odex25_hr/hr_base/models/hr_base.py @@ -84,7 +84,7 @@ class HrEmployee(models.Model): r_name = fields.Char("Name") # fields of page work information in employees view - emp_no = fields.Char(string="Employee number", tracking=True) + emp_no = fields.Char(string="Employee number", tracking=True, default=lambda self: self._default_emp_code()) english_name = fields.Char(string="English Name") home_no = fields.Char() present_address = fields.Char() @@ -249,6 +249,26 @@ class HrEmployee(models.Model): help='New participants who have no prior periods of contribution under the GOSI.') gosi_years = fields.Integer(string="GOSI Years", compute='_compute_gosi_years', store=True, help='GOSI Years According To The New activation Date Until Today') + + + @api.model + def _default_emp_code(self): + seq = self.env['ir.sequence'].next_by_code('hr.employee') or '/' + emp_seq = self.env['hr.employee'].search([('active', 'in', [False, True])]) + + # Get the maximum current employee number + max_number = 0 + if emp_seq: + max_number = max(int(emp.emp_no) for emp in emp_seq if emp.emp_no and emp.emp_no.isdigit()) + + # Ensure the sequence matches the max number + 1 + if int(seq) != (max_number + 1): + currnt_sequence = self.env['ir.sequence'].search([('code', '=', 'hr.employee')], limit=1) + currnt_sequence.write({'number_next_actual': max_number + 1}) + seq = self.env['ir.sequence'].next_by_code('hr.employee') or '/' + + return str(seq) + @api.depends('new_gosi') def _compute_gosi_years(self): for emp in self: