From dcac8730f91065fd098ec4b2e68553758114da34 Mon Sep 17 00:00:00 2001 From: Gurupreet Singh Date: Mon, 31 Jul 2023 16:43:02 +0530 Subject: [PATCH] [FIX] hr_timesheet: fix the traceback when group by date Description of the issue/feature this PR addresses: When selecting the "group by date" option in the timesheet portal view, a traceback error occurs. Fix: This PR addresses the traceback error by improving the handling of recordsets when grouping by date. task:3468392 closes odoo/odoo#145854 X-original-commit: f244a0685ceeff24edd4b6ab4a2213298dbf8621 Signed-off-by: Xavier Bol (xbo) --- addons/hr_timesheet/controllers/portal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_timesheet/controllers/portal.py b/addons/hr_timesheet/controllers/portal.py index 8cc54671206..1b3d987b57c 100644 --- a/addons/hr_timesheet/controllers/portal.py +++ b/addons/hr_timesheet/controllers/portal.py @@ -138,7 +138,7 @@ class TimesheetCustomerPortal(CustomerPortal): if field: if groupby == 'date': raw_timesheets_group = Timesheet_sudo._read_group( - domain, ['date:day'], ['unit_amount:sum', 'id:array_agg'] + domain, ['date:day'], ['unit_amount:sum', 'id:recordset'] ) grouped_timesheets = [(records, unit_amount) for __, unit_amount, records in raw_timesheets_group]