[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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user