From 43bec98da849ed1fee4328b57a81209903ca3e2e Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwerburgh Date: Mon, 15 Jul 2019 07:04:26 +0000 Subject: [PATCH] [FIX] hr_timesheet_attendance: Allow update module In PostgreSQL, we can't CREATE OR REPLACE VIEW if there is the type of the column change. To fix it, just drop the view before creating it closes odoo/odoo#34851 Signed-off-by: Yannick Tivisse (yti) --- .../report/hr_timesheet_attendance_report.py | 1 + 1 file changed, 1 insertion(+) 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 b6ecb28e910..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,