diff options
| author | Martin Trigaux <mat@odoo.com> | 2019-07-16 16:02:41 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2019-07-16 16:36:40 +0200 |
| commit | beba36416fdf25df74cf8a581c66948a418173b6 (patch) | |
| tree | d24b8a373560afcc78bde4c9c06338800809abfa /addons/hr_timesheet_attendance | |
| parent | 044904b9d50d61c5c7e5432a1b4615dda145704c (diff) | |
| parent | 40421be73c94551ba902856984c0155d062cb449 (diff) | |
[MERGE] Forward port of saas-12.3 to saas-12.4 up to 40421be73c94551b
Diffstat (limited to 'addons/hr_timesheet_attendance')
| -rw-r--r-- | addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report.py | 5 | ||||
| -rw-r--r-- | addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report_view.xml | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report.py b/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report.py index 0aa0bbaf275..572ba6d5ce9 100644 --- a/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report.py +++ b/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report.py @@ -17,6 +17,7 @@ class TimesheetAttendance(models.Model): @api.model_cr def init(self): + self._cr.execute("DROP VIEW IF EXISTS hr_timesheet_attendance_report") self._cr.execute("""CREATE OR REPLACE VIEW %s AS ( SELECT max(id) AS id, @@ -31,7 +32,7 @@ class TimesheetAttendance(models.Model): resource_resource.user_id AS user_id, hr_attendance.worked_hours AS attendance, NULL AS timesheet, - date_trunc('day', hr_attendance.check_in) AS date + hr_attendance.check_in::date AS date FROM hr_attendance LEFT JOIN hr_employee ON hr_employee.id = hr_attendance.employee_id LEFT JOIN resource_resource on resource_resource.id = hr_employee.resource_id @@ -41,7 +42,7 @@ class TimesheetAttendance(models.Model): ts.user_id AS user_id, NULL AS attendance, ts.unit_amount AS timesheet, - date_trunc('day', ts.date) AS date + ts.date AS date FROM account_analytic_line AS ts WHERE ts.project_id IS NOT NULL ) AS t diff --git a/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report_view.xml b/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report_view.xml index 85d071cf51d..6d868f15c50 100644 --- a/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report_view.xml +++ b/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report_view.xml @@ -15,7 +15,7 @@ <field name="name">HR timesheet attendance report: Pivot</field> <field name="model">hr.timesheet.attendance.report</field> <field name="arch" type="xml"> - <pivot string="timesheet attendance"> + <pivot string="timesheet attendance" disable_linking="True"> <field name="user_id" type="row"/> <field name="date" interval="day" type="col"/> <field name="total_difference" type="measure" widget="float_time"/> |
