[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
This commit is contained in:
Goffin Simon
2018-08-08 08:42:08 +02:00
parent efe2dcd7ae
commit ceb5c03c93
+2 -1
View File
@@ -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,