From 69db18ef0f6898ac3b1709988a12e96a88383530 Mon Sep 17 00:00:00 2001 From: jcoux Date: Wed, 3 Apr 2019 11:27:52 +0000 Subject: [PATCH] [FIX] hr_timesheet_attendance: allow update of view Add the missing drop_view_if_exists that allows the recreation of the template when updating the module closes odoo/odoo#32380 Signed-off-by: Martin Trigaux (mat) --- .../report/hr_timesheet_attendance_report.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 a0765b0d5cf..d18957fb522 100644 --- a/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report.py +++ b/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from odoo import api, fields, models +from odoo import api, fields, models, tools class TimesheetAttendance(models.Model): @@ -16,6 +16,7 @@ class TimesheetAttendance(models.Model): @api.model_cr def init(self): + tools.drop_view_if_exists(self.env.cr, self._table) self._cr.execute("""CREATE OR REPLACE VIEW %s AS ( SELECT max(id) AS id,