[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
This commit is contained in:
Antonin Bourguignon 2012-10-11 16:04:30 +02:00
parent 90ff5bf65a
commit b54b785266
1 changed files with 3 additions and 1 deletions

View File

@ -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,