summaryrefslogtreecommitdiff
path: root/addons/olap
diff options
context:
space:
mode:
authoratp (Open ERP) <atp@tinyerp.co.in>2010-06-22 10:45:44 +0530
committeratp (Open ERP) <atp@tinyerp.co.in>2010-06-22 10:45:44 +0530
commitb0efd26edd9f4e2aa75424b787ea46d2be15cd04 (patch)
treee78cdb693e62a5c9a17f77a395eec51fb34becbf /addons/olap
parent46bb1ea51be702758d68a5f69db32c82dbccf9bd (diff)
parent2319190c5a20cb8095f85cacca89a33164ba93d7 (diff)
[MERGE]: merge with lp:~openerp-dev/openobject-addons/trunk-dev-addons2
bzr revid: atp@tinyerp.co.in-20100622051544-c7hig73zk2at66cy
Diffstat (limited to 'addons/olap')
-rw-r--r--addons/olap/data/olap_view.xml2
-rw-r--r--addons/olap/olap.py20
-rw-r--r--addons/olap/wizard/wizard_load_data.py20
3 files changed, 17 insertions, 25 deletions
diff --git a/addons/olap/data/olap_view.xml b/addons/olap/data/olap_view.xml
index cfd326cbce3..17995cceacf 100644
--- a/addons/olap/data/olap_view.xml
+++ b/addons/olap/data/olap_view.xml
@@ -2,7 +2,7 @@
<openerp>
<data>
- <menuitem icon="terp-graph" id="base.reporting_menu" name="Reporting" sequence="8"/>
+ <menuitem icon="terp-graph" id="base.reporting_menu" name="Reporting" sequence="30"/>
<menuitem
id="base.next_id_50"
diff --git a/addons/olap/olap.py b/addons/olap/olap.py
index 835c0110b5b..317a56dd7c3 100644
--- a/addons/olap/olap.py
+++ b/addons/olap/olap.py
@@ -359,25 +359,17 @@ class olap_schema(osv.osv ):
if not ids:
raise 'Schema not found !'
schema = self.browse(cr, uid, ids[0], context)
- print 'Parsing MDX...'
- print ' ', request
mdx_parser = cube.mdx_parser()
mdx = mdx_parser.parse(request)
- print 'Validating MDX...'
mdx.preprocess()
validate, cubex = mdx.validate(schema)
- print 'Running MDX...'
res_comp = self.pool.get('res.company').search(cr, uid, ([]))
res_comp = self.pool.get('res.company').browse(cr, uid, res_comp)
currency = res_comp[0].currency_id.name
- print " Default Currency", currency
data = mdx.run(currency)
- print 'Running Done...'
- print 'Formatting Output...'
-
if cubex.query_log:
log = context.get('log')
@@ -1597,7 +1589,7 @@ class bi_load_db_wizard(osv.osv_memory):
from
INFORMATION_schema.key_column_usage
where
- constraint_name in (
+ constraint_name IN (
select constraint_name from INFORMATION_SCHEMA.table_constraints
where
constraint_type = 'FOREIGN KEY')""")
@@ -1633,7 +1625,7 @@ class bi_load_db_wizard(osv.osv_memory):
cols = {}
if tables_id:
cr.execute('select column_db_name,id,table_id from \
- olap_database_columns where table_id in (' + ','.join(tables_id) + ')')
+ olap_database_columns where table_id IN (' + ','.join(tables_id) + ')')
else:
cr.execute('select column_db_name,id,table_id from olap_database_columns')
@@ -1681,10 +1673,10 @@ class bi_load_db_wizard(osv.osv_memory):
from
INFORMATION_schema.key_column_usage
where table_schema= %s and
- constraint_name in (
+ constraint_name IN (
select constraint_name from INFORMATION_SCHEMA .table_constraints
where
- constraint_type in('PRIMARY KEY','FOREIGN KEY'))
+ constraint_type IN ('PRIMARY KEY','FOREIGN KEY'))
""", (db_name))
for constraint in cr_db.fetchall():
@@ -1722,7 +1714,7 @@ class bi_load_db_wizard(osv.osv_memory):
cols = {}
if tables_id:
cr.execute('select column_db_name,id,table_id from \
- olap_database_columns where table_id in (' + ','.join(tables_id) + ')')
+ olap_database_columns where table_id IN (' + ','.join(tables_id) + ')')
else:
cr.execute('select column_db_name,id,table_id from olap_database_columns')
@@ -1809,7 +1801,7 @@ class bi_load_db_wizard(osv.osv_memory):
from
all_cons_columns
where
- constraint_name in (
+ constraint_name IN (
select constraint_name from all_constraints
where
constraint_type = 'R' and owner = %s)
diff --git a/addons/olap/wizard/wizard_load_data.py b/addons/olap/wizard/wizard_load_data.py
index 0e7ae8a1508..989c6330469 100644
--- a/addons/olap/wizard/wizard_load_data.py
+++ b/addons/olap/wizard/wizard_load_data.py
@@ -73,7 +73,7 @@ def olap_db_connect(self,cr,uid,part,context={}):
tables_id = map(lambda x: str(tables[x]),tables)
cols={}
if tables_id:
- cr.execute('select column_db_name,id,table_id from olap_database_columns where table_id in (' + ','.join(tables_id) +')')
+ cr.execute('select column_db_name,id,table_id from olap_database_columns where table_id IN (' + ','.join(tables_id) +')')
else:
cr.execute('select column_db_name,id,table_id from olap_database_columns')
@@ -120,7 +120,7 @@ def olap_db_connect(self,cr,uid,part,context={}):
from
INFORMATION_schema.key_column_usage
where
- constraint_name in (
+ constraint_name IN (
select constraint_name from INFORMATION_SCHEMA .table_constraints
where
constraint_type = 'PRIMARY KEY')""")
@@ -138,7 +138,7 @@ def olap_db_connect(self,cr,uid,part,context={}):
from
INFORMATION_schema.constraint_column_usage
where
- constraint_name in (
+ constraint_name IN (
select constraint_name from INFORMATION_SCHEMA.table_constraints
where
constraint_type = 'FOREIGN KEY')""")
@@ -149,7 +149,7 @@ def olap_db_connect(self,cr,uid,part,context={}):
from
INFORMATION_schema.key_column_usage
where
- constraint_name in (
+ constraint_name IN (
select constraint_name from INFORMATION_SCHEMA.table_constraints
where
constraint_type = 'FOREIGN KEY')""")
@@ -181,7 +181,7 @@ def olap_db_connect(self,cr,uid,part,context={}):
tables_id = map(lambda x: str(tables[x]),tables)
cols={}
if tables_id:
- cr.execute('select column_db_name,id,table_id from olap_database_columns where table_id in (' + ','.join(tables_id) +')')
+ cr.execute('select column_db_name,id,table_id from olap_database_columns where table_id IN (' + ','.join(tables_id) +')')
else:
cr.execute('select column_db_name,id,table_id from olap_database_columns')
@@ -228,10 +228,10 @@ def olap_db_connect(self,cr,uid,part,context={}):
from
INFORMATION_schema.key_column_usage
where table_schema= %s and
- constraint_name in (
+ constraint_name IN (
select constraint_name from INFORMATION_SCHEMA .table_constraints
where
- constraint_type in('PRIMARY KEY','FOREIGN KEY'))
+ constraint_type IN ('PRIMARY KEY','FOREIGN KEY'))
""",(db_name))
for constraint in cr_db.fetchall():
@@ -267,7 +267,7 @@ def olap_db_connect(self,cr,uid,part,context={}):
tables_id = map(lambda x: str(tables[x]),tables)
cols={}
if tables_id:
- cr.execute('select column_db_name,id,table_id from olap_database_columns where table_id in (' + ','.join(tables_id) +')')
+ cr.execute('select column_db_name,id,table_id from olap_database_columns where table_id IN (' + ','.join(tables_id) +')')
else:
cr.execute('select column_db_name,id,table_id from olap_database_columns')
@@ -323,7 +323,7 @@ def olap_db_connect(self,cr,uid,part,context={}):
from
all_cons_columns
where
- constraint_name in (
+ constraint_name IN (
select constraint_name from all_constraints
where
constraint_type = 'P' and owner= %s)
@@ -353,7 +353,7 @@ def olap_db_connect(self,cr,uid,part,context={}):
from
all_cons_columns
where
- constraint_name in (
+ constraint_name IN (
select constraint_name from all_constraints
where
constraint_type = 'R' and owner = %s)