From c55f39b5b1aedf18cf74f9d2283c8fdb9d7fc0c0 Mon Sep 17 00:00:00 2001 From: nda-odoo Date: Wed, 15 Feb 2023 16:19:28 +0000 Subject: [PATCH] [FIX] hr_attendance: set default filter for reporting If you have a lot of attendance spread accross various employees and various dates, the report takes ages to load (or your browser freezes and you can't access reporting). And if it loads, the report is unreadable anyway. Use a default filter to always display user friendly graphs. Since we group by day, a default period of a month seems like a good compromise. To reproduce the issue: - install hr_attendance - use a script to create some attendances (ex: create 300 employees and 30 attendance for each, spread randomly in the last 3 years) - click on "Reporting" opw-3167099 closes odoo/odoo#112879 X-original-commit: 59bf5d4c5e7c95c6f561140f71634d84a12568a0 Signed-off-by: Kevin Baptiste --- addons/hr_attendance/report/hr_attendance_report_views.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_attendance/report/hr_attendance_report_views.xml b/addons/hr_attendance/report/hr_attendance_report_views.xml index ccce3a32636..a292d193452 100644 --- a/addons/hr_attendance/report/hr_attendance_report_views.xml +++ b/addons/hr_attendance/report/hr_attendance_report_views.xml @@ -7,7 +7,7 @@ - + @@ -47,7 +47,7 @@ hr.attendance.report graph,pivot - {'group_by': ['check_in:day', 'employee_id']} + {'group_by': ['check_in:day', 'employee_id'], 'search_default_check_in': '1'}