From 0492a8027093ccc6469de8d58cb3f3d84fbea992 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Wed, 23 Jul 2025 15:52:33 +0100 Subject: [PATCH 1/4] [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 2/4] [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 3/4] [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 4/4] [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)