From ceb5c03c930a169d26c66f9e75ef51db5baa764d Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Tue, 7 Aug 2018 14:27:38 +0200 Subject: [PATCH] [FIX] hr_holidays: Allocation Request not always in the Summary View Steps to reproduce the bug: - connect as the demo user - go to the Leaves app - check the Leaves Summary menu: by default, it is empty - go to Allocation Request - create one Allocation Request for 1.00 day using the Compensatory Days type - repeat the operation several time Bug: Only the first Allocation Request appears in the Leaves Summary opw:1872365 --- addons/hr_holidays/report/hr_leave_report.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/hr_holidays/report/hr_leave_report.py b/addons/hr_holidays/report/hr_leave_report.py index 5df7a3e4636..3e918920c52 100644 --- a/addons/hr_holidays/report/hr_leave_report.py +++ b/addons/hr_holidays/report/hr_leave_report.py @@ -38,6 +38,7 @@ class LeaveReport(models.Model): def init(self): tools.drop_view_if_exists(self._cr, 'hr_leave_report') + self._cr.execute(""" CREATE or REPLACE view hr_leave_report as ( SELECT row_number() over(ORDER BY leaves.employee_id) as id, @@ -61,7 +62,7 @@ class LeaveReport(models.Model): FALSE as payslip_status, 'allocation' as type from hr_leave_allocation as allocation - union select + union all select request.employee_id as employee_id, request.name as name, request.number_of_days as number_of_days,