From 3c75588e2d77fd83d5898766b2ce655815447347 Mon Sep 17 00:00:00 2001 From: Prakash Prajapati Date: Tue, 11 Jul 2023 06:43:17 +0000 Subject: [PATCH] [FIX] hr_attendance: open proper view in attendance report Steps: - Installed hr_attendance app - Open attendance app and go to report menu - Click on any cell Issue- When we click on the graph or pivot cell of the attendance report, the attendance report tree opens instead of the attendance tree. Why issue occurred? In this commit the openView function has moved from (Graph/Pivot) Controller to Renderer and in hr_attendance openView is in Controller so the issue has arisen. Commit-https://github.com/odoo/odoo/commit/c8ca9da7bcee2c122a9d6cf8cda89f02823ba42d#diff-4e5bfd019e8d595efdf999a6b56fcb45a3127bb8bd7bb960161710bcfcd83687 task-3420173 closes odoo/odoo#132805 X-original-commit: 14504c0f4576ae76b095d3ea5f00f72c077f532f Signed-off-by: Sofie Gvaladze (sgv) Signed-off-by: Prakash Prajapati (ppr) --- .../static/src/js/attendance_report_views.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/hr_attendance/static/src/js/attendance_report_views.js b/addons/hr_attendance/static/src/js/attendance_report_views.js index f52e12c6070..835b94e6464 100644 --- a/addons/hr_attendance/static/src/js/attendance_report_views.js +++ b/addons/hr_attendance/static/src/js/attendance_report_views.js @@ -30,7 +30,7 @@ function useOpenView() { }; } -export class AttendanceReportGraphController extends graphView.Controller { +export class AttendanceReportGraphRenderer extends graphView.Renderer { setup() { super.setup(); this.openView = useOpenView(); @@ -39,10 +39,10 @@ export class AttendanceReportGraphController extends graphView.Controller { viewRegistry.add("attendance_report_graph", { ...graphView, - Controller: AttendanceReportGraphController + Renderer: AttendanceReportGraphRenderer }); -export class AttendanceReportPivotController extends pivotView.Controller { +export class AttendanceReportPivotRenderer extends pivotView.Renderer { setup() { super.setup(); this.openView = useOpenView(); @@ -51,5 +51,5 @@ export class AttendanceReportPivotController extends pivotView.Controller { viewRegistry.add("attendance_report_pivot", { ...pivotView, - Controller: AttendanceReportPivotController + Renderer: AttendanceReportPivotRenderer });