[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) <yti@odoo.com>
This commit is contained in:
Nicolas Vannieuwerburgh
2019-07-15 07:04:26 +00:00
parent 5306fbb2c5
commit 43bec98da8
@@ -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,