From b54b785266f5412fa8bcc52fb7e20bf190eedd29 Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Thu, 11 Oct 2012 16:04:30 +0200 Subject: [PATCH] [IMP] make sure that the view is properly dropped before we re-create it the REPLACE VIEW statement can generate type conflicts in case where the view's data types change between two updates bzr revid: abo@openerp.com-20121011140430-0wgo70snzjhuxpyr --- addons/project/project.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/project/project.py b/addons/project/project.py index 4f1d2826980..58431ffd061 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -1426,7 +1426,9 @@ class project_task_history_cumulative(osv.osv): } def init(self, cr): - cr.execute(""" CREATE OR REPLACE VIEW project_task_history_cumulative AS ( + tools.drop_view_if_exists(cr, 'report_event_registration') + + cr.execute(""" CREATE VIEW project_task_history_cumulative AS ( SELECT history.date::varchar||'-'||history.history_id::varchar AS id, history.date AS end_date,