summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Wirtel <stephane@tinyerp.com>2009-05-19 14:42:44 +0200
committerStephane Wirtel <stephane@tinyerp.com>2009-05-19 14:42:44 +0200
commit2f6b3ec4ad512a13e00c7a65ed48b4acfdf02e7d (patch)
treea7b11bbe900b202b91dbd5048634e66d2eab7bbc
parenta9426fe4463c738528bae5da6e4b959cc19b3589 (diff)
[FIX] Remove the view if this one exists
bzr revid: stephane@tinyerp.com-20090519124244-2bd3zaeqqs2s4lk4
-rw-r--r--addons/report_intrastat/report_intrastat.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/report_intrastat/report_intrastat.py b/addons/report_intrastat/report_intrastat.py
index c45ac1085ae..36c429639f1 100644
--- a/addons/report_intrastat/report_intrastat.py
+++ b/addons/report_intrastat/report_intrastat.py
@@ -21,6 +21,7 @@
##############################################################################
from osv import osv, fields
+import tools.sql
class res_country(osv.osv):
_name = 'res.country'
@@ -66,6 +67,7 @@ class report_intrastat(osv.osv):
'currency_id': fields.many2one('res.currency', "Currency", readonly=True),
}
def init(self, cr):
+ tools.sql.drop_view_if_exists(cr, 'report_intrastat')
cr.execute("""
create or replace view report_intrastat as (
select