[FIX] account: reports: drop view before replacing them

bzr revid: olt@tinyerp.com-20120516065727-ghvzjttnncj8ryj0
This commit is contained in:
olt@tinyerp.com 2012-05-16 08:57:27 +02:00
parent 5415104047
commit 28e4d3a286
1 changed files with 3 additions and 1 deletions

View File

@ -48,6 +48,7 @@ class report_account_receivable(osv.osv):
_order = 'name desc'
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_account_receivable')
cr.execute("""
create or replace view report_account_receivable as (
select
@ -182,6 +183,7 @@ class report_invoice_created(osv.osv):
_order = 'create_date'
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_invoice_created')
cr.execute("""create or replace view report_invoice_created as (
select
inv.id as id, inv.name as name, inv.type as type,
@ -283,4 +285,4 @@ class report_account_sales(osv.osv):
)""")
report_account_sales()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: