Same problem in bin/addons/hr/report/timesheet.py.
At ligne 100, the query should use the same typecast :
sql = '''
select t.hour_from, t.hour_to
from hr_timesheet as t
inner join (hr_timesheet_group as g inner join hr_timesheet_employee_rel as rel
on rel.tgroup_id = g.id and rel.emp_id = %s)
on t.tgroup_id = g.id
where dayofweek = CAST(%s AS VARCHAR)
and date_from = (select max(date_from)
from hr_timesheet inner join (hr_timesheet_employee_rel inner join hr_timesheet_group on hr_timesheet_group.id = hr_timesheet_employee_rel.tgroup_id and hr_timesheet_employee_rel.emp_id = %s)
on hr_timesheet.tgroup_id = hr_timesheet_group.id
where dayofweek = CAST(%s AS VARCHAR) and date_from <= '%s')
order by date_from desc
'''
Same problem in bin/addons/ hr/report/ timesheet. py.
At ligne 100, the query should use the same typecast :
sql = ''' employee_ rel as rel employee_ rel
inner join hr_timesheet_group
on hr_timesheet_ group.id = hr_timesheet_ employee_ rel.tgroup_ id
and hr_timesheet_ employee_ rel.emp_ id = %s) tgroup_ id = hr_timesheet_ group.id
select t.hour_from, t.hour_to
from hr_timesheet as t
inner join (hr_timesheet_group as g inner join hr_timesheet_
on rel.tgroup_id = g.id and rel.emp_id = %s)
on t.tgroup_id = g.id
where dayofweek = CAST(%s AS VARCHAR)
and date_from = (select max(date_from)
from hr_timesheet inner join (hr_timesheet_
on hr_timesheet.
where dayofweek = CAST(%s AS VARCHAR) and date_from <= '%s')
order by date_from desc
'''