From b3bc6c08a0fd26b3564d93b6079295d9535da75a Mon Sep 17 00:00:00 2001 From: Kevin Baptiste Date: Mon, 19 Dec 2022 13:28:09 +0000 Subject: [PATCH] [IMP] hr_holidays: show all employee leaves in Off Today In the timeoff overview, the "Off Today" filter was only showing leaves that were occuring on the current day, hiding all the other leaves of the employee occuring that same period. Now it will display all the leaves for that period for the employees that are currently off. task-3098759 closes odoo/odoo#108290 Signed-off-by: Kevin Baptiste --- addons/hr_holidays/report/hr_leave_report_calendar.py | 2 ++ addons/hr_holidays/report/hr_leave_report_calendar.xml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/hr_holidays/report/hr_leave_report_calendar.py b/addons/hr_holidays/report/hr_leave_report_calendar.py index 3f84a585a73..0f26167a9dc 100644 --- a/addons/hr_holidays/report/hr_leave_report_calendar.py +++ b/addons/hr_holidays/report/hr_leave_report_calendar.py @@ -33,6 +33,8 @@ class LeaveReportCalendar(models.Model): is_hatched = fields.Boolean('Hatched', readonly=True) is_striked = fields.Boolean('Striked', readonly=True) + is_absent = fields.Boolean(related='employee_id.is_absent') + def init(self): tools.drop_view_if_exists(self._cr, 'hr_leave_report_calendar') self._cr.execute("""CREATE OR REPLACE VIEW hr_leave_report_calendar AS diff --git a/addons/hr_holidays/report/hr_leave_report_calendar.xml b/addons/hr_holidays/report/hr_leave_report_calendar.xml index b243cd308a0..efc317d5e1e 100644 --- a/addons/hr_holidays/report/hr_leave_report_calendar.xml +++ b/addons/hr_holidays/report/hr_leave_report_calendar.xml @@ -50,7 +50,7 @@ domain="[('employee_id.member_of_department', '=', True)]" help="My Department"/> - +