[REM] olap*: removal of olap modules, to be moved to extra-addons until after v6.0
bzr revid: odo@openerp.com-20101018150407-tqyokbfybb6lhr3i
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import olap
|
||||
import wizard
|
||||
@@ -1,52 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
{
|
||||
"name" : "Olap Schemes Management",
|
||||
"version" : "0.1",
|
||||
"author" : "OpenERP SA",
|
||||
"website" : "http://www.openerp.com",
|
||||
"depends" : ["base"],
|
||||
"category" : "Generic Modules/Olap",
|
||||
"description": """
|
||||
Olap module is used to install BI module in client. Olap provides Online
|
||||
Analytical Process with the mdx query. BI provides Cube Browsing and
|
||||
Cube Designing. After installing Olap Module you will get Cube Browser
|
||||
and Cube Desinger in Reporting Menu. Cube Browser is used to generate
|
||||
the reports with table view (mdx view) of mdx query. and Cube designer
|
||||
is used to make cubes in BI..
|
||||
""",
|
||||
"init_xml" : ["data/olap_data.xml"],
|
||||
"update_xml" : [
|
||||
"wizard/olap_query_logs_clear_view.xml",
|
||||
"wizard/olap_load_column_view.xml",
|
||||
"data/olap_wizard.xml",
|
||||
"data/olap_view.xml",
|
||||
"data/olap_cube_view.xml",
|
||||
"data/olap_fact_view.xml",
|
||||
"data/olap_cube_workflow.xml",
|
||||
"data/olap_security.xml",
|
||||
'security/ir.model.access.csv'
|
||||
],
|
||||
"demo_xml" : ["data/olap_demo.xml"],
|
||||
"active": False,
|
||||
"installable": True
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
DATABASE = 'bi'
|
||||
|
||||
all: simple sale date where sublevels calc_meas cross page complex test
|
||||
|
||||
simple:
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "tinyerp" -c "select {[User].[all]} on rows, {[measures].[Credit Limit],[measures].[Count]} on columns from Partner"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "tinyerp" -c "select {[measures].[Credit Limit],[measures].[Count]} on rows, {[User].[all],[User].children} on columns from Partner"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "tinyerp" -c "select {[User].children} on rows from Partner"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "tinyerp" -c "select {[User].[all],[User].children} on rows, {[measures].[Credit Limit],[measures].[Count]} on columns from Partner"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "tinyerp" -c "select {[User].children} on rows, {[User].children} on columns from Partner where ([measures].[Count])"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "tinyerp" -c "select {[User].children} on rows, {[measures].[Count]} on columns from Partner where ([User].[3])"
|
||||
# ./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "tinyerp" -c "select {[Date].[2008]} on rows, {[measures].[Credit Limit],[measures].[Count]} on columns from Partner"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "tinyerp" -c "select {[Date].[all],[Date].children} on rows, {[measures].[Credit Limit],[measures].[Count]} on columns from Partner"
|
||||
|
||||
sale:
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[Partner Country].children} on rows from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[City].children} on rows from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[City].children,[City].[Paris].children,[Partner Country].children} on rows, {[measures].[Total Sales]} on columns from Sales"
|
||||
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[Order Date].[all],[Order Date].children,[Users].children} on rows, {[measures].[Average Sales],[measures].[Total Sales]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[Order Date].children, [Order Date].[all]} on rows, {[measures].[Average Sales],[measures].[Total Sales]} on columns from Sales"
|
||||
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[Partner Country].children} on rows, {[measures].[Average Sales],[measures].[Total Sales]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[Partner Country].[China]} on rows, {[measures].[Average Sales],[measures].[Total Sales]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[Partner Country].[Belgium]} on rows, {[measures].[Average Sales],[measures].[Total Sales]} on columns from Sales"
|
||||
|
||||
date:
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[Order Date].children} on rows, {[measures].[Average Sales],[measures].[Total Sales]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[Order Date].[2007]} on rows, {[measures].[Average Sales],[measures].[Total Sales]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[Order Date].[2008]} on rows, {[measures].[Average Sales],[measures].[Total Sales]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[Order Date].children,[Order Date].[2008].children,[Order Date].[2008].[Q2].children} on rows, {[measures].[Total Sales]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[Order Date].children,[Order Date].[2008].children,[Order Date].[2008].[Q2].children} on rows, {[measures].[Total Sales]} on columns from Sales where ([Order Date].[2008].[Q2])"
|
||||
|
||||
where:
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c " select crossjoin (crossjoin ({[Order Date].[all],[Users].[all]} , {[Users].children} ) , {[Partner Country].[all]}) on rows, {[measures].[Units Sold]} on columns from Sales"
|
||||
sublevels:
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[City].[all],[City].children} on rows, {[measures].[Total Sales]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[City].[all],[City].children} on rows, {[measures].[Total Sales]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[City].[all],[City].children,[City].[Liege].children} on rows, {[measures].[Total Sales]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[Products Category].[all],[Products Category].children} on rows, {[measures].[Total Sales]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[Products Category].[all],[Products Category].children,[Products Category].[PC].children} on rows, {[measures].[Total Sales]} on columns from Sales"
|
||||
|
||||
calc_meas:
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[City].[all]} on rows, {[measures].[Total Sales]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[City].[all],[City].children} on rows, {[measures].[Total Sales]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[City].[all],[City].children} on rows, {[measures].[Units Sold],[measures].[Total Sales]} on columns from Sales"
|
||||
|
||||
cross:
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select crossjoin ({[Order Date].[all],[Order Date].children} , {[All Products].[all]}) on rows from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select crossjoin({[City].[all]},{[Users].[all]}) on rows, {[measures].[Total Sales]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select crossjoin({[City].[all],[Users].[all]},{[Order Date].[all]}) on rows, {[measures].[Total Sales]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select crossjoin({[City].[all],[City].children},{[Order Date].children}) on rows, {[measures].[Total Sales]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select crossjoin(crossjoin({[City].[all],[City].children},{[Users].children}),{[Order Date].children}) on rows, {[measures].[Total Sales]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select crossjoin(crossjoin({[City].[all],[City].children},{[Users].children}),{[Order Date].children}) on rows, {[measures].[Total Sales],[measures].[Units Sold]} on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select crossjoin(crossjoin({[City].[all],[Users].[all]},{[Order Date].[all]}),{[Order Date].children}) on rows, crossjoin({[All Products].[all],[Products Category].[all]},{[Partner Country].children}) on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select crossjoin({[City].[all]},{[Users].[all]}) on rows, crossjoin({[measures].[Total Sales]},{[Order Date].children}) on columns from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select crossjoin({[City].[all]},{[Users].[all]}) on rows, crossjoin(crossjoin({[measures].[Total Sales]},{[Order Date].children}),{[Users].children}) on columns from Sales"
|
||||
|
||||
page:
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[City].[all],[City].children} on rows, {[measures].[Units Sold],[measures].[Total Sales]} on columns, {[Order Date].children} on pages from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select {[measures].[Units Sold],[measures].[Total Sales]} on rows, {[City].[all],[City].children} on columns, {[Order Date].children} on pages from Sales"
|
||||
|
||||
complex:
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select crossjoin({[City].[all],[City].children},{[Order Date].[all]}) on rows, {[measures].[Units Sold],[measures].[Total Sales]} on columns, {[Order Date].children} on pages from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select crossjoin(crossjoin({[City].[all],[City].children},{[Order Date].children}),{[Users].children}) on rows, {[measures].[Units Sold],[measures].[Total Sales]} on columns, {[Order Date].children} on pages from Sales"
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "OpenERPSales" -c "select crossjoin(crossjoin({[City].[all],[City].children},{[Order Date].children}),{[Users].children}) on rows, crossjoin({[measures].[Units Sold],[measures].[Total Sales]},{[City].children}) on columns, {[Order Date].children} on pages from Sales"
|
||||
|
||||
test:
|
||||
./tinybi.py -d ${DATABASE} -H localhost -U admin -W admin -p 8069 -s "tinyerp" -c " select crossjoin (crossjoin ({[Order Date].[all],[Users].[all]} , {[Users].children} ) , {[Partner Country].[all]}) on rows, {[measures].[Units Sold]} on columns from Sales"
|
||||
@@ -1,86 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (c) 2004 TINY SPRL. (http://tiny.be) All Rights Reserved.
|
||||
# Fabien Pinckaers <fp@tiny.Be>
|
||||
#
|
||||
# WARNING: This program as such is intended to be used by professional
|
||||
# programmers who take the whole responsability of assessing all potential
|
||||
# consequences resulting from its eventual inadequacies and bugs
|
||||
# End users who are looking for a ready-to-use solution with commercial
|
||||
# garantees and support are strongly adviced to contract a Free Software
|
||||
# Service Company
|
||||
#
|
||||
# This program is Free Software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
#
|
||||
# This module test all RPC methods
|
||||
#
|
||||
|
||||
import optparse
|
||||
|
||||
import xmlrpclib
|
||||
import time
|
||||
|
||||
__version__ = '1.0'
|
||||
|
||||
parser = optparse.OptionParser(version=__version__)
|
||||
|
||||
group = optparse.OptionGroup(parser, "General options")
|
||||
group.add_option("-c", "--command", dest="command", help="The query to execute")
|
||||
group.add_option("-s", "--schema", dest="schema", help="The schema to use for the query")
|
||||
parser.add_option_group(group)
|
||||
|
||||
group = optparse.OptionGroup(parser, "Connection options")
|
||||
group.add_option("-d", "--database", dest="database", help="Database name")
|
||||
group.add_option("-H", "--hostname", dest="hostname", default='localhost', help="Server hostname")
|
||||
group.add_option("-U", "--username", dest="username", default='admin', help="Username")
|
||||
group.add_option("-W", "--password", dest="password", default='admin', help="Password")
|
||||
group.add_option("-p", "--port", dest="port", default=8069, help="Server port")
|
||||
parser.add_option_group(group)
|
||||
|
||||
(opt, args) = parser.parse_args()
|
||||
|
||||
sock = xmlrpclib.ServerProxy('http://'+opt.hostname+':'+str(opt.port)+'/xmlrpc/object')
|
||||
uid = 1
|
||||
|
||||
axis,data = sock.execute(opt.database, uid, opt.password, 'olap.schema', 'request', opt.schema, opt.command)
|
||||
COLSPAN = 18
|
||||
ROWSPAN = 18
|
||||
|
||||
print
|
||||
if len(axis)>1:
|
||||
for i in range(8):
|
||||
ok = False
|
||||
for x in axis[1]:
|
||||
if len(x[0])==i:
|
||||
ok = True
|
||||
if not ok:
|
||||
continue
|
||||
print ' '*COLSPAN,
|
||||
print (('%-'+str(ROWSPAN)+'s ' ) * len(axis[1])) % tuple(map(lambda x: str(len(x[0])==i and x[1] or ''),axis[1]))
|
||||
for col in data:
|
||||
print ('%-'+str(COLSPAN)+'s')% (' '*(len(axis[0][0][0])-1)*2 + str(axis[0].pop(0)[1]),),
|
||||
for row in col:
|
||||
if row==[False]:
|
||||
print ('%-'+str(ROWSPAN)+'s')%('',),
|
||||
else:
|
||||
print ('%-'+str(ROWSPAN)+'s')%(row,),
|
||||
print
|
||||
print
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
from mdx_parser import mdx_parser
|
||||
from mdx_output import mdx_output
|
||||
from warehouse import warehouse
|
||||
@@ -1,9 +0,0 @@
|
||||
import sqlalchemy
|
||||
|
||||
agregator = {}
|
||||
agregator['sum'] = sqlalchemy.func.sum
|
||||
agregator['count'] = sqlalchemy.func.count
|
||||
agregator['avg'] = sqlalchemy.func.avg
|
||||
agregator['min'] = sqlalchemy.func.min
|
||||
agregator['max'] = sqlalchemy.func.max
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
|
||||
import sqlalchemy
|
||||
import common
|
||||
|
||||
|
||||
|
||||
class axis(object):
|
||||
def __init__(self, axis, name=None):
|
||||
self.axis = axis
|
||||
self.name = name
|
||||
|
||||
def validate(self, cube):
|
||||
self.object = cube
|
||||
self.axis.validate(cube)
|
||||
|
||||
def name_set(self, name):
|
||||
self.name = name
|
||||
|
||||
def __repr__(self):
|
||||
res = '\t<olap.axis ['+str(self.name)+']\n'
|
||||
res += str(self.axis)
|
||||
res += '\t>'
|
||||
return res
|
||||
|
||||
#
|
||||
# Output:
|
||||
# a list of grouped values that can be computed at once
|
||||
# a group is defined by elements having the same query
|
||||
#
|
||||
# [
|
||||
# {
|
||||
# 'level': ["Time","2008","Q1"],
|
||||
# 'value': '1er Trim 2008',
|
||||
# 'query': SQLAlchemy query object
|
||||
# }
|
||||
# ]
|
||||
#
|
||||
|
||||
def run(self, metadata):
|
||||
result = self.axis.run(metadata)
|
||||
return result
|
||||
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1,109 +0,0 @@
|
||||
#
|
||||
# Interface for all mapping objects to map values into the right
|
||||
# position in the cube, according to cube definition
|
||||
#
|
||||
|
||||
class mapping(object):
|
||||
def query_init(self):
|
||||
pass
|
||||
def position_get(self):
|
||||
return 0
|
||||
|
||||
class column_static(mapping):
|
||||
def __init__(self, value=False, position=0):
|
||||
self.value = value
|
||||
def cube_set(self, cube, value, delta=0):
|
||||
return cube[ delta]
|
||||
def value_set(self, value=False):
|
||||
value.pop(0)
|
||||
return self.value
|
||||
|
||||
|
||||
class column_static_dummy(mapping):
|
||||
def __init__(self, value=False, position=0):
|
||||
self.value = value
|
||||
def cube_set(self, cube, value, delta=0):
|
||||
return cube[ delta]
|
||||
def value_set(self, value=False):
|
||||
value.pop(0)
|
||||
return self.value
|
||||
|
||||
class column_fixed(mapping):
|
||||
def __init__(self, pos=0, position=0):
|
||||
self.pos = pos
|
||||
def cube_set(self, cube, value, delta=0):
|
||||
return cube[ self.pos +delta]
|
||||
def value_set(self, value):
|
||||
return value.pop(0)
|
||||
|
||||
class column_mapping_value(mapping):
|
||||
def __init__(self, value, position=0):
|
||||
self.axis_value = {}
|
||||
for v in range(len(value)):
|
||||
self.axis_value[value[v][0]] = v
|
||||
|
||||
def cube_set(self, cube, value, delta=0):
|
||||
pos = value.pop(0)
|
||||
return cube[ self.axis_value[pos]+delta ]
|
||||
def value_set(self, value):
|
||||
return False
|
||||
|
||||
class column_mapping(mapping):
|
||||
def __init__(self, value, position=0):
|
||||
self.axis_value = {}
|
||||
for v in range(len(value)):
|
||||
self.axis_value[value[v][0]] = v
|
||||
|
||||
def cube_set(self, cube, value, delta=0):
|
||||
pos = value.pop(0)
|
||||
return cube[ self.axis_value[pos]+delta ]
|
||||
|
||||
def value_set(self, value):
|
||||
return False
|
||||
|
||||
def position_get(self):
|
||||
return 1
|
||||
|
||||
|
||||
class column_mapping_axis(mapping):
|
||||
def __init__(self, mapping, axis, position=0):
|
||||
keys = {}
|
||||
i = 0
|
||||
for a in axis:
|
||||
keys[tuple(list(a)[0][1:])] = i
|
||||
i+=1
|
||||
|
||||
self.axis_value = {}
|
||||
for m in mapping:
|
||||
k = tuple(list(m)[:-1])
|
||||
a = keys[k]
|
||||
self.axis_value[tuple(m)[-1]] = a
|
||||
|
||||
def cube_set(self, cube, value, delta=0):
|
||||
pos = value.pop(0)
|
||||
return cube[ self.axis_value[pos]+delta ]
|
||||
|
||||
def value_set(self, value):
|
||||
return False
|
||||
|
||||
def position_get(self):
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
class column_mapping_join(mapping):
|
||||
def __init__(self, mappings, position=0):
|
||||
self.mappings = mappings
|
||||
|
||||
def cube_set(self, cube, value, delta=0):
|
||||
for m in self.mappings:
|
||||
cube = m.cube_set(cube, value, delta)
|
||||
return cube
|
||||
|
||||
def value_set(self, value):
|
||||
for m in self.mappings:
|
||||
value = m.value_set(value)
|
||||
return value
|
||||
|
||||
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1,109 +0,0 @@
|
||||
import sqlalchemy
|
||||
from sqlalchemy import *
|
||||
import common
|
||||
|
||||
def measure_sql_exp_col(metadata,col):
|
||||
temp = col.split(".")
|
||||
table_name = filter(lambda x: x.name==temp[0],metadata.table_iterator(reverse=False))
|
||||
if table_name:
|
||||
if not col in table_name[0].c:
|
||||
col = sqlalchemy.Column(temp[1], sqlalchemy.Float)
|
||||
table_name[0].append_column(col)
|
||||
return col
|
||||
else:
|
||||
for k in table_name[0].c:
|
||||
if temp[1] == k.name:
|
||||
return k
|
||||
else:
|
||||
print "The table %s do not exist or match to cube fact table"%(temp[0])
|
||||
# To be Improved
|
||||
# I am sure it exist something better in SA
|
||||
def col_get(table, col_obj):
|
||||
# table = sqlalchemy table object
|
||||
# level = level object
|
||||
|
||||
# Check for the columns
|
||||
|
||||
datatypes = {
|
||||
'timestamp': sqlalchemy.DateTime,
|
||||
'timestampz': sqlalchemy.DateTime,
|
||||
'numeric': sqlalchemy.Numeric,
|
||||
'int': sqlalchemy.Integer,
|
||||
'float8': sqlalchemy.Float,
|
||||
'varchar': sqlalchemy.String,
|
||||
'bool': sqlalchemy.Boolean,
|
||||
'bytea':'Byte A', # Not Clear
|
||||
'int2':sqlalchemy.SmallInteger,
|
||||
'int4':sqlalchemy.Integer,
|
||||
'int8':sqlalchemy.Integer,
|
||||
'text':sqlalchemy.String,
|
||||
'date':sqlalchemy.Date,
|
||||
'time': sqlalchemy.Time,
|
||||
'number':sqlalchemy.Numeric,
|
||||
}
|
||||
if not ('.').join([col_obj.table_id.table_db_name,col_obj.column_db_name]) in table.c:
|
||||
col = sqlalchemy.Column(col_obj.column_db_name, datatypes[col_obj.type])
|
||||
table.append_column(col)
|
||||
return col
|
||||
else:
|
||||
for k in table.c:
|
||||
if col_obj.column_db_name == k.name:
|
||||
return k
|
||||
|
||||
def get_primary_key(table):
|
||||
for cols in table.columns:
|
||||
if cols.primary_key == True:
|
||||
return cols
|
||||
|
||||
|
||||
# It gets the olap_cube_table browse object
|
||||
def table_get(metadata, table):
|
||||
result = False
|
||||
table1 = False
|
||||
table2 = False
|
||||
if table.line_ids:
|
||||
temp = 0
|
||||
for i in range(len(table.line_ids)):
|
||||
table1 = sqlalchemy.Table(table.line_ids[i].table_id.table_db_name,metadata)
|
||||
pk = get_primary_key(table.line_ids[i].table_id)
|
||||
if result:
|
||||
|
||||
result = join(result,table1, onclause=col_get(table1,pk)==col_get(table2,table.line_ids[i-1].field_id))
|
||||
elif table2:
|
||||
result = join(table1, table2, onclause=col_get(table1,pk)==col_get(table2,table.line_ids[i-1].field_id))
|
||||
else:
|
||||
table2=table1
|
||||
temp=i
|
||||
|
||||
if not result:
|
||||
result = table1
|
||||
pk = get_primary_key(table.line_ids[temp].table_id)
|
||||
tab = sqlalchemy.Table(table.line_ids[temp].field_id.related_to.table_db_name,metadata)
|
||||
result = join(result, tab,onclause=col_get(tab,pk)
|
||||
==col_get(sqlalchemy.Table(table.line_ids[temp].table_id.table_db_name,metadata),table.line_ids[temp].field_id))
|
||||
|
||||
else:
|
||||
if table.column_link_id.related_to:
|
||||
result = sqlalchemy.Table(table.column_link_id.related_to.table_db_name,metadata)
|
||||
else:
|
||||
result = sqlalchemy.Table(table.column_link_id.table_id.table_db_name,metadata)
|
||||
|
||||
return result
|
||||
|
||||
def xcombine(*seqin):
|
||||
"""
|
||||
Cartesian product of the list of list that produce all distinct
|
||||
subsets of my query.
|
||||
"""
|
||||
def rloop(seqin,comb):
|
||||
'''recursive looping function'''
|
||||
if seqin:
|
||||
for item in seqin[0]:
|
||||
newcomb=comb+[item]
|
||||
for item in rloop(seqin[1:],newcomb):
|
||||
yield item
|
||||
else:
|
||||
yield comb
|
||||
return rloop(seqin, [])
|
||||
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1,32 +0,0 @@
|
||||
|
||||
import sqlalchemy
|
||||
import common
|
||||
import level
|
||||
|
||||
class cross(object):
|
||||
def __init__(self, cross):
|
||||
self.cross = cross
|
||||
self.name = False
|
||||
self.object = False
|
||||
|
||||
def validate(self, cube):
|
||||
for obj in self.cross:
|
||||
self.object = obj.validate(cube)
|
||||
return self.object
|
||||
|
||||
def name_set(self, name):
|
||||
self.name = name
|
||||
|
||||
def __repr__(self):
|
||||
res = '\t<olap.cross\n'
|
||||
res += str(self.cross)
|
||||
res += '\t>'
|
||||
return res
|
||||
|
||||
def run(self, metadata):
|
||||
print '*'*40
|
||||
for obj in self.cross:
|
||||
result = obj.run(metadata)
|
||||
return result
|
||||
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1,24 +0,0 @@
|
||||
|
||||
import sqlalchemy
|
||||
import common
|
||||
|
||||
class cube(object):
|
||||
def __init__(self, name=None):
|
||||
super(cube, self).__init__()
|
||||
self.object = False
|
||||
self.name = name
|
||||
|
||||
def run(self, metadata):
|
||||
table = common.table_get(metadata, self.object.table_id)
|
||||
return sqlalchemy.select(from_obj = [table], columns=[]),table
|
||||
|
||||
def validate(self, schema):
|
||||
for cube in schema.cube_ids:
|
||||
if self.name == cube.name:
|
||||
self.object = cube
|
||||
break
|
||||
return self.object
|
||||
|
||||
def __repr__(self):
|
||||
return self.name
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1,8 +0,0 @@
|
||||
|
||||
class datatype_class(object):
|
||||
def __init__(self):
|
||||
self.datatype = {}
|
||||
def subscribe(self, name, data):
|
||||
self.datatype[name] = data
|
||||
datatype = datatype_class()
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1,8 +0,0 @@
|
||||
class formatstring_class(object):
|
||||
def __init__(self):
|
||||
self.formatstrings = {}
|
||||
def subscribe(self, name, data):
|
||||
self.formatstrings[name] = data
|
||||
formatstring = formatstring_class()
|
||||
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1,322 +0,0 @@
|
||||
|
||||
import sqlalchemy
|
||||
import common
|
||||
import axis_map
|
||||
import pooler,tools
|
||||
|
||||
class level(object):
|
||||
def __init__(self, level, sublevels=[]):
|
||||
self.level = level
|
||||
self.sublevels = sublevels
|
||||
self.object = False
|
||||
|
||||
def validate(self, cube):
|
||||
for dimension in cube.dimension_ids:
|
||||
if self.object:
|
||||
break
|
||||
for hierarchy in dimension.hierarchy_ids:
|
||||
if hierarchy.name==self.level:
|
||||
self.object = hierarchy
|
||||
break
|
||||
|
||||
#
|
||||
# TODO: implement access to unique levels for not fully qualified names
|
||||
#
|
||||
if not self.object:
|
||||
raise 'This dimension (%s) does not exist !' % (self.level,)
|
||||
|
||||
obj = hierarchy
|
||||
pos = 0
|
||||
for level in self.sublevels:
|
||||
res = level.validate(hierarchy.level_ids[pos])
|
||||
if res:
|
||||
pos += 1
|
||||
return self.object
|
||||
|
||||
def _to_unicode(self,s):
|
||||
try:
|
||||
return s.encode('ascii')
|
||||
except UnicodeError:
|
||||
try:
|
||||
return s.decode('utf-8')
|
||||
except UnicodeError:
|
||||
try:
|
||||
return s.decode('latin')
|
||||
except UnicodeError:
|
||||
return s
|
||||
|
||||
def _to_decode(self,s):
|
||||
try:
|
||||
return s.encode('utf-8')
|
||||
except UnicodeError:
|
||||
try:
|
||||
return s.encode('latin')
|
||||
except UnicodeError:
|
||||
try:
|
||||
return s.decode('ascii')
|
||||
except UnicodeError:
|
||||
return s
|
||||
|
||||
def run(self, metadata):
|
||||
'''
|
||||
RETURN: {
|
||||
'value': [(ID, NAME)], # ID = ['user', 3]
|
||||
'query': {
|
||||
'whereclause': [col.in_(*primary_keys)],
|
||||
'column': [col],
|
||||
'group_by': [col]
|
||||
},
|
||||
'axis_mapping': axis_map.column_mapping(result),
|
||||
'delta':0
|
||||
}
|
||||
'''
|
||||
if self.sublevels[0].name=='all':
|
||||
return [{
|
||||
'value': [([str(self.level)], str(self.level), False)],
|
||||
'query': {
|
||||
'column': [sqlalchemy.literal('all')],
|
||||
},
|
||||
'axis_mapping': axis_map.column_static(False),
|
||||
'delta':0,
|
||||
}]
|
||||
|
||||
|
||||
# Make these 2 commands working in all cases:
|
||||
# return self._run_transform(metadata)
|
||||
# return self._run_star(metadata)
|
||||
|
||||
if self.object.table_id<>self.object.dimension_id.cube_id.table_id: # Add a condition on the object
|
||||
result = self._run_transform(metadata)
|
||||
else:
|
||||
result = self._run_star(metadata)
|
||||
return result
|
||||
|
||||
def _compute_axis(self, metadata, primarykey=False):
|
||||
"""
|
||||
Compute axis values, and transform the main query in the same way
|
||||
to add this branch of the star for this subset. The mappers
|
||||
reassign to values.
|
||||
"""
|
||||
|
||||
#
|
||||
# Build a query on all tables of the hierarchy
|
||||
# It passes the hierarchy table_id browse object (olap_cube_table )
|
||||
#
|
||||
table = common.table_get(metadata, self.object.table_id)
|
||||
#
|
||||
# Implement the query for all sublevels
|
||||
# Return:
|
||||
# [ (ID1, ID2, ID3, NAME, [PRIMARYKEY]) ]
|
||||
#
|
||||
result_axis = {}
|
||||
for slevel in self.sublevels:
|
||||
res = slevel.run(metadata, table)
|
||||
for key in res.keys():
|
||||
result_axis.setdefault(key, [])
|
||||
result_axis[key] += res[key]
|
||||
cols = []
|
||||
axis_select = sqlalchemy.select(from_obj=[table], columns=[], distinct=True)
|
||||
for where in result_axis.get('where_clause', []):
|
||||
axis_select.append_whereclause(where)
|
||||
for col in result_axis.get('column', []):
|
||||
axis_select.append_column(col)
|
||||
for group in result_axis.get('group_by', []):
|
||||
axis_select.append_group_by(group)
|
||||
# TODO: find a way to do: axis_select2 = axis_select.copy()
|
||||
axis_select2 = sqlalchemy.select(from_obj=[table], columns=[], distinct=True)
|
||||
for where in result_axis.get('where_clause', []):
|
||||
axis_select2.append_whereclause(where)
|
||||
for col in result_axis.get('column', []):
|
||||
axis_select2.append_column(col)
|
||||
for group in result_axis.get('group_by', []):
|
||||
axis_select2.append_group_by(group)
|
||||
# TODO: end
|
||||
#metadata.bind.echo = True
|
||||
axis_select2.append_column(result_axis['column_name'][-1].label('axis_name'))
|
||||
query = axis_select2.execute()
|
||||
result = query.fetchall()
|
||||
|
||||
def _tuple_define(x):
|
||||
y=list(x)
|
||||
if y[-1] == None:
|
||||
y[-1] = '/'
|
||||
elif isinstance(y[-1],float):
|
||||
y[-1] = str (int(y[-1]))
|
||||
else:
|
||||
y[-1] = self._to_unicode(y[-1])
|
||||
y[-1] = tools.ustr(y[-1])
|
||||
return ([self.level]+y[:-1]),y[-1]
|
||||
|
||||
axis = map(_tuple_define, result)
|
||||
# Gives the mapping
|
||||
|
||||
primary_key = ''
|
||||
if primarykey:
|
||||
if self.object.table_id.column_link_id.related_to:
|
||||
primary_key = self.object.table_id.column_link_id.related_to
|
||||
else:
|
||||
primary_key = self.object.table_id.column_link_id.table_id
|
||||
tableprim = sqlalchemy.Table(primary_key.table_db_name, metadata)
|
||||
pk = common.get_primary_key(primary_key)
|
||||
col = common.col_get(tableprim,pk)
|
||||
axis_select.append_column(col.label('axis_primarykey'))
|
||||
query = axis_select.execute()
|
||||
result = query.fetchall()
|
||||
else:
|
||||
# To find the primary key that suits best as per the given criteria
|
||||
raise 'Primary key table not made in the hierarchy'
|
||||
|
||||
maps = []
|
||||
position =0
|
||||
for mapping in result_axis['axis_mapping']:
|
||||
mapinst = mapping(result, position)
|
||||
maps.append(mapinst)
|
||||
position += mapinst.position_get()
|
||||
result_axis['axis_mapping'] = maps
|
||||
#
|
||||
# #
|
||||
# # Apply the filters on the main query object due to this block
|
||||
# #
|
||||
#
|
||||
# maps = []
|
||||
# position =0
|
||||
# for mapping in result_axis['axis_mapping']:
|
||||
# mapinst = mapping(result, position)
|
||||
# maps.append(mapinst)
|
||||
# position += mapinst.position_get()
|
||||
# result_axis['axis_mapping'] = maps
|
||||
# print '*'*50
|
||||
# print table, result, result_axis
|
||||
return table, axis, result ,result_axis
|
||||
|
||||
def _run_star(self, metadata):
|
||||
"""
|
||||
Compute axis values, and transform the main query in the same way
|
||||
to add this branch of the star for this subset. The mappers
|
||||
reassign to values.
|
||||
"""
|
||||
print '*** Start ***'
|
||||
table, result,result_mapping, result_axis = self._compute_axis(metadata, True)
|
||||
result_axis.setdefault('where_clause', [])
|
||||
#
|
||||
# The result to be applied to the main query object
|
||||
#
|
||||
result = {
|
||||
'value': result,
|
||||
'query': {
|
||||
# 'whereclause': result_axis.get('where_clause',[]),
|
||||
'column': result_axis.get('column', []),
|
||||
'group_by': result_axis.get('column', [])
|
||||
},
|
||||
##
|
||||
## How to use group of axis_mapping ?
|
||||
##
|
||||
'axis_mapping': axis_map.column_static(False),
|
||||
'delta':0,
|
||||
}
|
||||
return [result]
|
||||
|
||||
def _run_transform(self, metadata):
|
||||
"""
|
||||
Compute axis values, and transform the main query according to axis
|
||||
values for this subset. The main query slicer is transformed to a
|
||||
single condition like: foreign_key in (...) and reapplied to axis
|
||||
values.
|
||||
"""
|
||||
|
||||
table, axis, mapping, result_axis = self._compute_axis(metadata, True)
|
||||
table2 = common.table_get(metadata, self.object.dimension_id.cube_id.table_id)
|
||||
sql_table = sqlalchemy.Table(self.object.table_id.column_link_id.table_id.table_db_name,metadata)
|
||||
col = common.col_get(sql_table, self.object.table_id.column_link_id)
|
||||
|
||||
#
|
||||
# The result to be applied to the main query object
|
||||
#
|
||||
|
||||
result = []
|
||||
for a in axis:
|
||||
k = tuple(list(a)[0][1:])
|
||||
mapping_axis = filter(lambda m: tuple(list(m)[:-1])==k, mapping)
|
||||
primary_keys = map(lambda x:list(x)[-1], mapping_axis)
|
||||
# To convert everything in to the string so that no conversion needed at later stage
|
||||
# This is for the elements to be displayed in the rows and columns
|
||||
for i in range(len(a[0])):
|
||||
if a[0][i]:
|
||||
if isinstance(a[0][i],int):
|
||||
a[0][i] = str(a[0][i])
|
||||
elif isinstance(a[0][i],float):
|
||||
a[0][i] = str(int(a[0][i]))
|
||||
else:
|
||||
a[0][i] = '/'
|
||||
a = list(a)
|
||||
if isinstance(a[-1],int):
|
||||
a[-1] = str(a[-1])
|
||||
elif isinstance(a[-1],float):
|
||||
a[-1] = str(int(a[-1]))
|
||||
a = tuple(a)
|
||||
primary_keys = map(lambda x: str(x),primary_keys)
|
||||
result.append( {
|
||||
'value': [a],
|
||||
'query': {
|
||||
|
||||
'whereclause': [col.in_(primary_keys)],#.extend(result_axis['where_clause']),
|
||||
'column': [sqlalchemy.literal('transform')],
|
||||
},
|
||||
'axis_mapping': axis_map.column_static(False),
|
||||
'delta':0,
|
||||
})
|
||||
return result
|
||||
|
||||
def __repr__(self):
|
||||
res= '\t\t<olap.level \n'
|
||||
res+= '\t\t\t'+str(self.level)+'\n'
|
||||
for l in self.sublevels:
|
||||
res+= '\t\t\t'+str(l)+'\n'
|
||||
res += '\t\t>'
|
||||
return res
|
||||
|
||||
class level_filter(object):
|
||||
def __init__(self, name):
|
||||
self.name=name
|
||||
self.object=None
|
||||
|
||||
def validate(self, level):
|
||||
self.object = level
|
||||
return 1
|
||||
|
||||
#
|
||||
# Modify for the query select to return tuples:
|
||||
# (id, name)
|
||||
# where:
|
||||
# id: ["Time","2008","Q1"]
|
||||
# name: Quarter 1
|
||||
# Return a description of what have been added
|
||||
#
|
||||
def run(self, metadata, table):
|
||||
return self.object._types[self.object.type].run( self, metadata, table)
|
||||
|
||||
def __repr__(self):
|
||||
return '<olap.level_filter '+self.name+'>'
|
||||
|
||||
class level_function(object):
|
||||
def __init__(self, name):
|
||||
self.type='function'
|
||||
self.name = name
|
||||
self.object = None
|
||||
# [{
|
||||
# 'level': ["Time","2008","Q1"],
|
||||
# 'value': '1er Trim 2008',
|
||||
# 'query': SQLAlchemy query object
|
||||
# }]
|
||||
def run(self, metadata, table):
|
||||
return self.object._types[self.object.type].children( self, metadata, table)
|
||||
|
||||
def validate(self, level):
|
||||
self.object = level
|
||||
return 0
|
||||
|
||||
def __repr__(self):
|
||||
return '<olap.level_function '+self.name+'>'
|
||||
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,3 +0,0 @@
|
||||
import level_interface
|
||||
from level_normal import level_normal
|
||||
from level_date import *
|
||||
@@ -1,109 +0,0 @@
|
||||
|
||||
import sqlalchemy
|
||||
from level_interface import level_interface
|
||||
|
||||
from olap.cube import common
|
||||
from olap.cube import axis_map
|
||||
|
||||
#
|
||||
# To Be Fixed:
|
||||
# Mapping of QX and Month
|
||||
#
|
||||
|
||||
class level_date_month(level_interface):
|
||||
def run(self, level, metadata, table):
|
||||
col = common.col_get(sqlalchemy.Table(level.object.table_name,metadata), level.object.column_name)
|
||||
col_id = common.col_get(sqlalchemy.Table(level.object.table_name,metadata), level.object.column_name)
|
||||
result = {
|
||||
'column': [sqlalchemy.func.date_part('month',col_id)],
|
||||
'column_name': [sqlalchemy.func.date_part('month', col)],
|
||||
'axis_mapping': [axis_map.column_mapping],
|
||||
'where_clause': [sqlalchemy.func.date_part('month',col_id) == level.name]
|
||||
}
|
||||
return result
|
||||
|
||||
def children(self, level, metadata, table):
|
||||
col = common.col_get(sqlalchemy.Table(level.object.table_name,metadata), level.object.column_name)
|
||||
col_id = common.col_get(sqlalchemy.Table(level.object.table_name,metadata), level.object.column_name)
|
||||
qexpr = sqlalchemy.literal('Q')+ sqlalchemy.sql.cast(sqlalchemy.func.date_part('QUARTER',col_id), sqlalchemy.types.String) + sqlalchemy.sql.cast(sqlalchemy.func.date_part('month',col_id),sqlalchemy.types.String)
|
||||
return {
|
||||
'column': [sqlalchemy.func.date_part('month',col)],
|
||||
'column_name':[sqlalchemy.func.date_part('month',col)],
|
||||
'axis_mapping': [axis_map.column_mapping]
|
||||
}
|
||||
|
||||
def validate(self, level, name):
|
||||
|
||||
return 1
|
||||
|
||||
class level_date_year(level_interface):
|
||||
def run(self, level, metadata, table):
|
||||
col = common.col_get(sqlalchemy.Table(level.object.table_name,metadata),level.object.column_name)
|
||||
col_id = common.col_get(sqlalchemy.Table(level.object.table_name,metadata), level.object.column_name)
|
||||
result = {
|
||||
'column': [sqlalchemy.func.date_part('year',col_id)],
|
||||
'column_name': [sqlalchemy.func.date_part('year', col)],
|
||||
'axis_mapping': [axis_map.column_mapping],
|
||||
'where_clause': [sqlalchemy.func.date_part('year',col_id) == level.name]
|
||||
}
|
||||
return result
|
||||
|
||||
def children(self, level, metadata, table):
|
||||
col = common.col_get(sqlalchemy.Table(level.object.table_name,metadata), level.object.column_name)
|
||||
col_id = common.col_get(sqlalchemy.Table(level.object.table_name,metadata), level.object.column_name)
|
||||
return {
|
||||
'column': [sqlalchemy.func.date_part('year',col_id)],
|
||||
'column_name':[sqlalchemy.func.date_part('year',col)],
|
||||
'axis_mapping': [axis_map.column_mapping],
|
||||
'where_clause':[]
|
||||
}
|
||||
|
||||
def validate(self, level, name):
|
||||
return 1
|
||||
|
||||
#
|
||||
# To Do: Create your own axis mapping
|
||||
#
|
||||
class level_date_quarter(level_interface):
|
||||
|
||||
def run(self, level, metadata, table):
|
||||
quarters = {
|
||||
'Q1': [1,2,3],
|
||||
'Q2': [4,5,6],
|
||||
'Q3': [7,8,9],
|
||||
'Q4': [10,11,12]
|
||||
}
|
||||
col = common.col_get(sqlalchemy.Table(level.object.table_name,metadata), level.object.column_name)
|
||||
col_id = common.col_get(sqlalchemy.Table(level.object.table_name,metadata), level.object.column_name)
|
||||
qexpr = sqlalchemy.literal('Q')+ sqlalchemy.sql.cast(sqlalchemy.func.date_part('QUARTER',col_id), sqlalchemy.types.String)
|
||||
if not level.name in quarters:
|
||||
raise 'Quarter should be in Q1,Q2,Q3,Q4 !'
|
||||
|
||||
result = {
|
||||
'column': [qexpr],
|
||||
'column_name': [qexpr],
|
||||
'axis_mapping': [axis_map.column_static],
|
||||
'where_clause': [
|
||||
(sqlalchemy.func.date_part('month',col_id)==quarters[level.name][0]) |
|
||||
(sqlalchemy.func.date_part('month',col_id)==quarters[level.name][1]) |
|
||||
(sqlalchemy.func.date_part('month',col_id)==quarters[level.name][2])
|
||||
]
|
||||
}
|
||||
return result
|
||||
|
||||
|
||||
|
||||
def children(self, level, metadata, table):
|
||||
table = sqlalchemy.Table(level.object.table_name, metadata)
|
||||
col =common.col_get(table, level.object.column_name)
|
||||
col_id = common.col_get(table,level.object.column_name)
|
||||
qexpr = sqlalchemy.literal('Q')+ sqlalchemy.sql.cast(sqlalchemy.func.date_part('QUARTER',col_id), sqlalchemy.types.String)
|
||||
return {
|
||||
'column': [qexpr],
|
||||
'column_name': [qexpr],
|
||||
'axis_mapping': [axis_map.column_mapping_value]
|
||||
}
|
||||
|
||||
def validate(self, level, name):
|
||||
return 1
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1,14 +0,0 @@
|
||||
|
||||
class level_interface(object):
|
||||
#
|
||||
# Return the number of position consummed by this level
|
||||
# 1 means this goes to the next level object (.[20])
|
||||
# 0 means that the next argument is still on the same level object (.children)
|
||||
#
|
||||
def validate(self, level, name):
|
||||
return 1
|
||||
|
||||
def run(self, level, metadata, table):
|
||||
col = None
|
||||
return {}
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1,32 +0,0 @@
|
||||
import sqlalchemy
|
||||
from olap.cube import common
|
||||
from olap.cube import axis_map
|
||||
from level_interface import level_interface
|
||||
|
||||
class level_normal(level_interface):
|
||||
def run(self, level, metadata, table):
|
||||
col = common.col_get(sqlalchemy.Table(level.object.table_name,metadata), level.object.column_name)
|
||||
col_id = common.col_get(sqlalchemy.Table(level.object.table_name,metadata), level.object.column_name)
|
||||
result = {
|
||||
'column': [col_id],
|
||||
'column_name': [col],
|
||||
'axis_mapping': [axis_map.column_mapping],
|
||||
'where_clause': [col_id == level.name ]
|
||||
}
|
||||
return result
|
||||
|
||||
def children(self, level, metadata, table):
|
||||
col = common.col_get(sqlalchemy.Table(level.object.table_name,metadata), level.object.column_name)
|
||||
col_id = common.col_get(sqlalchemy.Table(level.object.table_name,metadata), level.object.column_name)
|
||||
result = {
|
||||
'column': [col_id],
|
||||
'column_name': [col],
|
||||
'axis_mapping': [axis_map.column_mapping],
|
||||
'where_clause': []
|
||||
}
|
||||
return result
|
||||
|
||||
def validate(self, level, name):
|
||||
return 1
|
||||
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1 +0,0 @@
|
||||
from mdx_input import mdx_input
|
||||
@@ -1,5 +0,0 @@
|
||||
|
||||
class mdx_input(object):
|
||||
|
||||
def parse(self, mdx):
|
||||
return mdx
|
||||
@@ -1,35 +0,0 @@
|
||||
import common
|
||||
|
||||
#
|
||||
# Class constructed by {..., ...}
|
||||
#
|
||||
class mdx_set(object):
|
||||
def __init__(self, list):
|
||||
self.list = list
|
||||
|
||||
def run(self, metadata):
|
||||
"""
|
||||
Should use xcombine, I think it's currently False
|
||||
common.xcombine(*result)
|
||||
"""
|
||||
result = []
|
||||
for l in self.list:
|
||||
result += l.run(metadata)
|
||||
position = 0
|
||||
for r in result:
|
||||
r['delta'] = position
|
||||
position += len(r['value'])
|
||||
return result
|
||||
|
||||
def validate(self, object):
|
||||
for l in self.list:
|
||||
l.validate(object)
|
||||
return True
|
||||
|
||||
def __repr__(self):
|
||||
res = '\tSet: ['
|
||||
for l in self.list:
|
||||
res += str(l)+',\n'
|
||||
res += '\t]'
|
||||
return res
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1 +0,0 @@
|
||||
from mdx_output import *
|
||||
@@ -1,56 +0,0 @@
|
||||
#
|
||||
# Modify the final result (axis, data), for instance, reordering of axes
|
||||
#
|
||||
import copy
|
||||
|
||||
def decimal_to_float(cube):
|
||||
# Note FP: I think the decimal > float conversion should be done more
|
||||
# in upstream
|
||||
if type(cube)==type([]) and len(cube):
|
||||
if type(cube[0])==type([]):
|
||||
for b in cube:
|
||||
decimal_to_float(b)
|
||||
else:
|
||||
for l in range(len(cube)):
|
||||
cube[l] = str(float(cube[l]))
|
||||
|
||||
def sort_apply(cube, axis_pos):
|
||||
cube2 = copy.copy(cube)
|
||||
for i in range(len(axis_pos)):
|
||||
cube[i] = cube2[axis_pos[i]]
|
||||
return cube
|
||||
|
||||
def sort_axis(data):
|
||||
for axis_id in range(len(data[0])):
|
||||
axis_pos = []
|
||||
for i in range(len(data[0][axis_id])):
|
||||
axis_pos.append((data[0][axis_id][i], i))
|
||||
axis_pos.sort()
|
||||
data[0][axis_id] = map(lambda x: x[0], axis_pos)
|
||||
axis_pos2 = map(lambda x: x[1], axis_pos)
|
||||
cubes = [ data[1] ]
|
||||
for i in range(axis_id):
|
||||
cubes2 = []
|
||||
for cube in cubes:
|
||||
cubes2 += cube
|
||||
cubes = cubes2
|
||||
for cube in cubes:
|
||||
sort_apply(cube, axis_pos2)
|
||||
|
||||
def mdx_output(data):
|
||||
print 'DATA', data
|
||||
# decimal_to_float(data[1])
|
||||
# sort_axis(data)
|
||||
return data
|
||||
|
||||
if __name__=='__main__':
|
||||
print 'Testing Code'
|
||||
data = ([[(['user'], 'All user')], [(['measures', 'credit_limit'], 'credit_limit'), (['measures', 'count'], 'count')]], [[[66700.0], [22L]]])
|
||||
data = ([[([u'Products'], u'All Products'), ([u'Order Date'], u'All Order Date')]], [[False], [False]])
|
||||
data = ([[([u'Order Date'], u'All Order Date'), ([u'Order Date', 2007.0], 2007.0), ([u'Order Date', 2008.0], 2008.0), ([u'Order Date', 2007.0, 'Q1'], 'Q1'), ([u'Order Date', 2007.0, 'Q2'], 'Q2'), ([u'Order Date', 2007.0, 'Q3'], 'Q3'), ([u'Order Date', 2007.0, 'Q4'], 'Q4'), ([u'Users'], u'All Users'), ([u'Users', 'Administrator'], 'Administrator'), ([u'Users', 'Demo User'], 'Demo User'), ([u'Users', 'Root'], 'Root'), ([u'Partner Country'], u'All Partner Country'), ([u'Partner Country', 'Belgium'], 'Belgium'), ([u'Partner Country', 'China'], 'China'), ([u'Partner Country', 'France'], 'France'), ([u'Partner Country', 'Taiwan'], 'Taiwan')]], [[False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False], [False]])
|
||||
data = ([[([u'Order Date'], u'All Order Date'), ([u'Order Date', 2007.0], 2007.0), ([u'Order Date', 2008.0], 2008.0), ([u'Order Date', 2007.0, 'Q1'], 'Q1'), ([u'Order Date', 2007.0, 'Q2'], 'Q2'), ([u'Order Date', 2007.0, 'Q3'], 'Q3'), ([u'Order Date', 2007.0, 'Q4'], 'Q4'), ([u'Users'], u'All Users'), ([u'Users', 'Administrator'], 'Administrator'), ([u'Users', 'Demo User'], 'Demo User'), ([u'Users', 'Root'], 'Root'), ([u'Partner Country'], u'All Partner Country'), ([u'Partner Country', 'Belgium'], 'Belgium'), ([u'Partner Country', 'China'], 'China'), ([u'Partner Country', 'France'], 'France'), ([u'Partner Country', 'Taiwan'], 'Taiwan')], [(['measures', u'Items Sold'], u'Items Sold')]], [[[Decimal("258.00")]], [[Decimal("34.00")]], [[Decimal("224.00")]], [[Decimal("12.00")]], [[Decimal("9.00")]], [[Decimal("6.00")]], [[Decimal("7.00")]], [[Decimal("258.00")]], [[Decimal("204.00")]], [[Decimal("16.00")]], [[Decimal("38.00")]], [[Decimal("258.00")]], [[Decimal("17.00")]], [[Decimal("78.00")]], [[Decimal("139.00")]], [[Decimal("2.00")]]])
|
||||
print 'Old', data
|
||||
sort_axis(data)
|
||||
print 'New', data
|
||||
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1,201 +0,0 @@
|
||||
"""
|
||||
Tiny BI
|
||||
Copyright (C)2007 Fabien Pinckaers
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation version 2.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
"""
|
||||
|
||||
from pyparsing import *
|
||||
|
||||
import cube, axis, measure, level, query, slicer, cross
|
||||
import mdx_operator
|
||||
|
||||
|
||||
#
|
||||
# Predicate: the construction of the object's query does not depend
|
||||
# on the schema architecture. I think we can go on for this, this will
|
||||
# simplify the extension/module architecture.
|
||||
#
|
||||
# Rethink about that in one month.
|
||||
#
|
||||
|
||||
class mdx_parser(object):
|
||||
def mdx_level(self):
|
||||
"""
|
||||
Return a parser that parse the level part of the MDX query and
|
||||
return a level object
|
||||
Examples:
|
||||
[prod].[all prod].children
|
||||
[prod].[all prod].join(...)
|
||||
"""
|
||||
leftSqBr = Literal("[").suppress()
|
||||
rightSqBr = Literal("]").suppress()
|
||||
dotToken = Literal(".").suppress()
|
||||
measuresToken = Literal("measures").suppress()
|
||||
scalar = Word(alphanums+alphas8bit.encode("utf-8") +"_"+" "+"-" )
|
||||
level_filter = leftSqBr + scalar + rightSqBr
|
||||
level_function = Keyword("children", caseless=True)
|
||||
level_filter.setParseAction(lambda s,a,toks: level.level_filter(toks[0]))
|
||||
level_function.setParseAction(lambda s,a,toks: level.level_function(toks[0]))
|
||||
level_item = level_filter | level_function
|
||||
level_parse = leftSqBr + scalar + rightSqBr + Optional(dotToken + delimitedList(level_item, ".", combine=False))
|
||||
level_parse.setParseAction(lambda s,a,toks: level.level(toks[0], toks[1:]))
|
||||
measure_parse = leftSqBr + measuresToken + rightSqBr + dotToken + leftSqBr + scalar + rightSqBr
|
||||
measure_parse.setParseAction(lambda s,a,toks: measure.measure(toks[0]))
|
||||
lev = measure_parse | level_parse
|
||||
return lev
|
||||
|
||||
|
||||
def mdx_axis(self):
|
||||
"""
|
||||
Return a parser that parse the axis part of the MDX query and
|
||||
return an axis object
|
||||
Examples:
|
||||
{[prod].[all prod].children, [a]}
|
||||
OR
|
||||
crossjoin({[Order Date].[all]},{[prod].[all prod].children, [a]})
|
||||
This is to be made recursive for the cross join
|
||||
crossjoin(crossjoin({[City].[all],[City].children},{[User].[all]}),{[User].[Administrator]})
|
||||
|
||||
"""
|
||||
leftCurlBr = Literal("{").suppress()
|
||||
rightCurlBr = Literal("}").suppress()
|
||||
comma = Literal(",").suppress()
|
||||
|
||||
level_parse = self.mdx_level()
|
||||
axis_parser = delimitedList(level_parse, ",", combine=False)
|
||||
axis_parser.setParseAction(lambda s,a,toks:axis.axis(mdx_operator.mdx_set(toks)))
|
||||
|
||||
mdx = leftCurlBr + axis_parser + rightCurlBr
|
||||
|
||||
return mdx
|
||||
|
||||
def cross_axis(self):
|
||||
leftCurlBr = Literal("{").suppress()
|
||||
rightCurlBr = Literal("}").suppress()
|
||||
cross_parser = self.mdx_level()
|
||||
cross_parser.setParseAction(lambda s,a,toks:cross.cross(toks))
|
||||
|
||||
cross_parse = leftCurlBr + cross_parser + rightCurlBr
|
||||
|
||||
return cross_parse
|
||||
|
||||
def mdx_cross_axis(self):
|
||||
leftRoundBr = Literal("(").suppress()
|
||||
rightRoundBr = Literal(")").suppress()
|
||||
comma = Literal(",").suppress()
|
||||
crossjoinToken = Keyword("crossjoin", caseless=True).suppress()
|
||||
|
||||
crossx = Forward()
|
||||
cross_mdx = crossx | self.mdx_axis()
|
||||
crossx << (crossjoinToken + leftRoundBr + cross_mdx + comma + self.cross_axis() + rightRoundBr)
|
||||
# crossx.setParseAction(lambda s,a,toks:axis.axis(toks)
|
||||
simple_mdx = self.mdx_axis()
|
||||
|
||||
mdx = simple_mdx | crossx
|
||||
return mdx
|
||||
|
||||
def mdx_axis_list(self):
|
||||
#
|
||||
# TODO: accept notation line AXIS(0) = rows, AXIS(1)=columns, ...
|
||||
#
|
||||
row_names = ["rows","columns","pages"]
|
||||
onToken = Keyword("on", caseless=True).suppress()
|
||||
page_name = oneOf(' '.join(row_names))
|
||||
axis_parser = self.mdx_cross_axis() + Optional(onToken + page_name)
|
||||
|
||||
def _assign_name(s,a,toks):
|
||||
if len(toks)>=3:
|
||||
toks[0].name_set(toks[-1])
|
||||
for x in range(1,len(toks)-1):
|
||||
toks[x].name_set('cross')
|
||||
elif len(toks)==2:
|
||||
toks[0].name_set(toks[1])
|
||||
elif len(toks)==1:
|
||||
toks[0].name_set(row_names.pop(0))
|
||||
else:
|
||||
raise 'invalid size'
|
||||
return toks[:-1]
|
||||
axis_parser.setParseAction(_assign_name)
|
||||
axis_lst = delimitedList(axis_parser, ",")
|
||||
axis_lst.setParseAction(lambda s,a,toks: [toks])
|
||||
return axis_lst
|
||||
|
||||
def mdx_slice(self):
|
||||
""" Return a MDX parser of the where clause of a MDX query """
|
||||
leftBr = Literal("(").suppress()
|
||||
rightBr = Literal(")").suppress()
|
||||
levels = delimitedList(self.mdx_level(), ',', combine=False)
|
||||
levels.setParseAction(lambda s,a,toks: toks)
|
||||
slicer_lst = delimitedList(leftBr + levels + rightBr, ",", combine=False)
|
||||
slicer_lst.setParseAction(lambda s,a,toks:slicer.slicer(list(toks)))
|
||||
return slicer_lst
|
||||
|
||||
def mdx_cube(self):
|
||||
""" Return a MDX parser of the from clause of a MDX query """
|
||||
mdx = Word(alphas+'_')
|
||||
mdx.setParseAction(lambda s,a,toks: cube.cube(toks[0]))
|
||||
return mdx
|
||||
|
||||
def mdx_query(self):
|
||||
""" Return a MDX parser of the from clause of a MDX query """
|
||||
selectToken = Keyword("select", caseless=True).suppress()
|
||||
fromToken = Keyword("from", caseless=True).suppress()
|
||||
whereToken = Keyword("where", caseless=True).suppress()
|
||||
semicolon = Literal(";").suppress()
|
||||
mdx = selectToken + self.mdx_axis_list() + fromToken + self.mdx_cube() + Optional(whereToken + self.mdx_slice()) + Optional(semicolon)
|
||||
mdx.setParseAction(lambda s,a,toks: query.query(*toks))
|
||||
return mdx
|
||||
|
||||
def parse(self, query):
|
||||
""" Parse a string and get a MDX object """
|
||||
return self.mdx_query().parseString(query)[0]
|
||||
|
||||
if __name__ == "__main__":
|
||||
mdx = mdx_parser()
|
||||
level_parse = mdx.mdx_level()
|
||||
for test in ['[sales].children','[prod].[all prod]']:
|
||||
print 'Testing level', test
|
||||
print level_parse.parseString(test)
|
||||
print
|
||||
axis_parser = mdx.mdx_axis()
|
||||
for test in ['{[a]}','{[prod].[all prod],[time].[Q3].[Sep]}']:
|
||||
print 'Testing axis', test
|
||||
print axis_parser.parseString(test)
|
||||
|
||||
axis_parser = mdx.mdx_axis_list()
|
||||
for test in ['{[a]} on rows, {[prod].[all prod],[time].[Q3].[Sep]} on columns',
|
||||
'{[region].[all region].children} on rows, {[prod].[all prod].children} on columns'
|
||||
]:
|
||||
print 'Testing axis', test
|
||||
print axis_parser.parseString(test)
|
||||
|
||||
cube_parser = mdx.mdx_cube()
|
||||
for test in ['sales']:
|
||||
print 'Testing axis', test
|
||||
print cube_parser.parseString(test)
|
||||
|
||||
for query_parser in [
|
||||
"Select {[region].[all region].children} on rows, {[product]} on columns from cubulus where ([time].[all time].[time_2005])",
|
||||
"Select {[region].[all region].children} on rows, {[prod].[all prod].children} on columns from cubulus where ([time].[all time].[time_2005])",
|
||||
#"Select {[time].[all time].children} on rows, crossjoin([region].[all region].children, [region].[all region].children) on columns from cubulus"
|
||||
]:
|
||||
print 'Testing ', query_parser
|
||||
print mdx.parse(query_parser)
|
||||
|
||||
print mdx.parse('''select
|
||||
{[date].[2007].[Q2].children} on rows,
|
||||
{[country_id].children,[country_id].[1].children} on columns
|
||||
from res_partner where ([measure].[credit_limit])''')
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1,84 +0,0 @@
|
||||
|
||||
import sqlalchemy
|
||||
import common
|
||||
import copy
|
||||
import pyparsing
|
||||
import operator
|
||||
from operator import add,sub
|
||||
from pyparsing import *
|
||||
|
||||
from agregator import agregator
|
||||
import axis_map
|
||||
|
||||
class measure(object):
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
self.object = False
|
||||
def validate(self, cube):
|
||||
for measure in cube.measure_ids:
|
||||
if measure.name==self.name:
|
||||
self.object = measure
|
||||
if not self.object:
|
||||
raise 'This measure does not exist !'
|
||||
return True
|
||||
|
||||
def run(self, metadata):
|
||||
table = common.table_get(metadata, self.object.cube_id.table_id)
|
||||
if self.object.measure_type == 'fact_column':
|
||||
col = common.col_get(sqlalchemy.Table(self.object.table_name,metadata), self.object.value_column)
|
||||
col_agregated = agregator[self.object.agregator](col)
|
||||
else:
|
||||
scalar = Word(alphanums+"_"+" "+".")
|
||||
sql_func = ["sum","max","min","count","avg"]
|
||||
arith_operator = ["-","*","/","+"]
|
||||
|
||||
sql_function = oneOf(' '.join(sql_func))
|
||||
leftRdBr = Literal("(").suppress()
|
||||
rightRdBr = Literal(")").suppress()
|
||||
operator_arith = oneOf(' '.join(arith_operator))
|
||||
sqlexpression = sql_function.setResultsName('sql_func') + leftRdBr + delimitedList(scalar,",",combine=False) + rightRdBr | sql_function + leftRdBr + scalar + ZeroOrMore(operator_arith.setResultsName('arithmetic') + scalar) + rightRdBr
|
||||
res = sqlexpression.parseString(self.object.value_sql)
|
||||
operators = []
|
||||
cols = []
|
||||
function = None
|
||||
for item in res:
|
||||
if str(item) == res.sql_func:
|
||||
function = str(item)
|
||||
elif str(item) == res.arithmetic or str(item) in ["+","-","/","*"]:
|
||||
operators.append(str(item))
|
||||
else:
|
||||
cols.append(common.measure_sql_exp_col(metadata,str(item)))
|
||||
operations = {
|
||||
'+':operator.add,
|
||||
'-':operator.sub,
|
||||
'/':operator.div,
|
||||
'%':operator.mod,
|
||||
'*':operator.mul,
|
||||
}
|
||||
operators = [operations[name] for name in operators]
|
||||
ops_cols = zip(operators, cols[1:])
|
||||
col = reduce(lambda expr, op_col: op_col[0](expr, op_col[1]), ops_cols,cols[0])
|
||||
|
||||
if function:
|
||||
col_agregated = agregator[function](col)
|
||||
else:
|
||||
col_agregated = col
|
||||
|
||||
return [ {
|
||||
'value': [(['measures',self.name], self.name, False)],
|
||||
'query': {
|
||||
'column': [col_agregated]
|
||||
},
|
||||
'axis_mapping': axis_map.column_fixed(0),
|
||||
'delta': 0,
|
||||
'format':self.object.formatstring
|
||||
} ]
|
||||
|
||||
def children(self, level, metadata):
|
||||
raise 'Not yet implemented !'
|
||||
|
||||
def __repr__(self):
|
||||
res= '\t\t<olap.measure %s>\n' % (self.name,)
|
||||
return res
|
||||
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1,236 +0,0 @@
|
||||
import locale
|
||||
|
||||
|
||||
import mdx_input
|
||||
import sqlalchemy
|
||||
import common
|
||||
import slicer
|
||||
import datetime
|
||||
import pooler
|
||||
import copy
|
||||
|
||||
class mapper(object):
|
||||
def __init__(self, size):
|
||||
self.size = size
|
||||
|
||||
class query(object):
|
||||
def __init__(self, axis, cube, slicer_obj=None, *args):
|
||||
super(query, self).__init__()
|
||||
self.object = False
|
||||
self.cube = cube
|
||||
self.axis = axis
|
||||
if not slicer_obj:
|
||||
slicer_obj = slicer.slicer([])
|
||||
self.slicer = slicer_obj
|
||||
|
||||
#
|
||||
# Generate the cube with 'False' values
|
||||
# This function could be improved
|
||||
#
|
||||
def _cube_create(self, cube_size):
|
||||
cube_data = [False]
|
||||
while cube_size:
|
||||
newcube = []
|
||||
for i in range(cube_size.pop()):
|
||||
newcube.append(copy.deepcopy(cube_data))
|
||||
cube_data = newcube
|
||||
return cube_data
|
||||
|
||||
def run(self,currency):
|
||||
db = sqlalchemy.create_engine(self.object.schema_id.database_id.connection_url,encoding='utf-8')
|
||||
metadata = sqlalchemy.MetaData(db)
|
||||
print 'Connected to database...', self.object.schema_id.database_id.connection_url
|
||||
#
|
||||
# Compute axis
|
||||
#
|
||||
axis = []
|
||||
axis_result = []
|
||||
cube_size = []
|
||||
cross = False
|
||||
cross_all = []
|
||||
for ax in self.axis:
|
||||
if ax.name == 'cross':
|
||||
cross = True
|
||||
cross = ax.run(metadata)
|
||||
cube_size[-1] = cube_size[-1] * len(cross)
|
||||
temp = axis_result[0][:]
|
||||
cross_all.append(cross)
|
||||
final_axis = []
|
||||
for cr in cross:
|
||||
for el in axis_result[-1]:
|
||||
t = copy.deepcopy(el)
|
||||
t = list(t)
|
||||
t[0].append(cr['value'][0][0])
|
||||
t.append(cr['value'][0][1])
|
||||
final_axis.append(tuple(t))
|
||||
axis_result[-1]=final_axis[:]
|
||||
final_axis=[]
|
||||
len_axis = len(axis[-1])
|
||||
len_cross = len(cross)
|
||||
delta_count = 0
|
||||
d=0
|
||||
for data in common.xcombine(axis[-1],cross):
|
||||
flag = False
|
||||
make_where = []
|
||||
temp_where = []
|
||||
temp_column = []
|
||||
if 'whereclause' in data[0]['query'].keys():
|
||||
flag = True
|
||||
temp_where = data[0]['query']['whereclause'][0]
|
||||
data[0]['query']['whereclause']=str(data[0]['query']['whereclause'][0])
|
||||
|
||||
if isinstance(type(data[0]['query']['column'][0]),type(sqlalchemy.sql.expression._BindParamClause)):
|
||||
temp_column = data[0]['query']['column'][0]
|
||||
data[0]['query']['column'][0] = str(data[0]['query']['column'][0])
|
||||
data_temp = copy.deepcopy(data[0])
|
||||
if 'whereclause' in data[1]['query'].keys():
|
||||
if 'whereclause' in data_temp['query'].keys():
|
||||
make_where.append(data[1]['query']['whereclause'][0])
|
||||
else:
|
||||
make_where.append(data[1]['query']['whereclause'][0])
|
||||
delta_count = delta_count + 1
|
||||
if delta_count >= len_cross and len_cross!=1:
|
||||
delta_count = 0
|
||||
data_temp['delta'] = d
|
||||
d = d + 1
|
||||
else:
|
||||
data_temp['delta'] = d
|
||||
d = d + 1
|
||||
if flag:
|
||||
data[0]['query']['whereclause']=[temp_where]
|
||||
data_temp['query']['whereclause'] = [temp_where]
|
||||
if make_where:
|
||||
if 'whereclause' in data_temp['query'].keys():
|
||||
data_temp['query']['whereclause'].append(make_where[0])
|
||||
else:
|
||||
data_temp['query']['whereclause'] = make_where
|
||||
if temp_column:
|
||||
data[0]['query']['column'] = [temp_column]
|
||||
data_temp['query']['column'] = [temp_column]
|
||||
final_axis.append(data_temp)
|
||||
axis[-1] = []
|
||||
axis[-1] = final_axis
|
||||
else:
|
||||
cross = False
|
||||
result = ax.run(metadata)
|
||||
length = 0
|
||||
axis_result2 = []
|
||||
for r in result:
|
||||
length += len(r['value'])
|
||||
axis_result2 += map(lambda x: (map(lambda y: y or False,x[0]),x[1] or False), r['value'])
|
||||
axis_result.append(axis_result2)
|
||||
axis.append(result)
|
||||
cube_size.append(length)
|
||||
cube_data = self._cube_create(cube_size)
|
||||
cr = []
|
||||
slice = self.slicer.run(metadata)
|
||||
position = 0
|
||||
ax = []
|
||||
for subset in common.xcombine(*axis):
|
||||
select,table_fact = self.cube.run(metadata)
|
||||
for s in subset+slice:
|
||||
for key,val in s['query'].items():
|
||||
for v in val:
|
||||
if key=='column':
|
||||
v = v.label('p_%d' % (position,))
|
||||
position += 1
|
||||
select.append_column(v)
|
||||
elif key=='whereclause':
|
||||
select.append_whereclause(v)
|
||||
elif key=='group_by':
|
||||
select.append_group_by(v)
|
||||
else:
|
||||
raise 'Error, %s not implemented !'% (key,)
|
||||
# metadata.bind.echo = True
|
||||
query = select.execute()
|
||||
result = query.fetchall()
|
||||
for record in result:
|
||||
cube = cube_data
|
||||
r = list(record)
|
||||
value = False
|
||||
for s in subset:
|
||||
if s.has_key('format'):
|
||||
# To make use of the format string if specified for the measure
|
||||
# Its set to static for a testing
|
||||
if not currency:
|
||||
currency = "EUR"
|
||||
if isinstance(r[0],float) or isinstance(r[0],int) or isinstance(r[0],long):
|
||||
a = {'data':r[0]}
|
||||
r[0] = str(r[0])
|
||||
else:
|
||||
r[0] = '0.0'
|
||||
a = {'data':0.0}
|
||||
if s['format'] == 'cr_prefix':
|
||||
r[0] = currency + " " + "%.2f"%a['data']
|
||||
elif s['format'] == 'cr_postfix':
|
||||
r[0] = "%.2f"%a['data'] + " " + currency
|
||||
elif s['format'] == 'comma_sep':
|
||||
r[0] = locale.format("%(data).2f", a, 1)
|
||||
elif s['format'] == 'cr_prefix_comma':
|
||||
r[0] = locale.format("%(data).2f", a, 1)
|
||||
r[0] = currency + " " + str(r[0])
|
||||
elif s['format'] == 'cr_postfix_comma':
|
||||
a['currency'] = currency
|
||||
r[0] = locale.format("%(data).2f %(currency)s", a, 1)
|
||||
cube = s['axis_mapping'].cube_set(cube, r, s['delta'])
|
||||
value = s['axis_mapping'].value_set(r) or value
|
||||
for s in slice:
|
||||
value = s['axis_mapping'].value_set(r) or value
|
||||
if value:
|
||||
assert not cube[0], 'Already a value in cube, this is a bug !'
|
||||
cube[0] = value
|
||||
|
||||
i=0
|
||||
for a in cube_data:
|
||||
i=i+1;
|
||||
return (axis_result, cube_data)
|
||||
|
||||
def preprocess(self):
|
||||
wrapper = mdx_input.mdx_input()
|
||||
wrapper.parse(self)
|
||||
|
||||
def validate(self, schema):
|
||||
""" This function takes a query object and validate and assign
|
||||
fact data to it. Browse object from Tiny ERP"""
|
||||
cube = self.cube.validate(schema)
|
||||
self.object = cube
|
||||
if not self.object:
|
||||
raise "Cube '%s' not found in the schema '%s' !"%(cube.name, schema.name)
|
||||
self.slicer.validate(cube)
|
||||
|
||||
for axis in self.axis:
|
||||
axis.validate(cube)
|
||||
for dimension in cube.dimension_ids:
|
||||
pass
|
||||
return True,cube
|
||||
|
||||
def __repr__(self):
|
||||
res = '<olap.query ['+str(self.cube)+']\n'
|
||||
for l in self.axis:
|
||||
res+= '\tAxis: '+str(l)+'\n'
|
||||
res+= '\tSlicer:\n'+str(self.slicer)+'\n'
|
||||
res += '>'
|
||||
return res
|
||||
|
||||
def log(self,cr,uid,cube,query,context={}):
|
||||
if not context==False:
|
||||
log_ids = pooler.get_pool(cr.dbname).get('olap.query.logs').search( cr, uid, [('query','=', query), ('user_id','=', uid)])
|
||||
if log_ids:
|
||||
count = pooler.get_pool(cr.dbname).get('olap.query.logs').browse(cr, uid, log_ids, context)[0]
|
||||
pooler.get_pool(cr.dbname).get('olap.query.logs').write(cr, uid, log_ids, {'count':count.count+1})
|
||||
|
||||
else:
|
||||
logentry={}
|
||||
logentry['user_id']=uid
|
||||
logentry['cube_id']=cube.id
|
||||
logentry['query']=query
|
||||
logentry['time']= str(datetime.datetime.now())
|
||||
logentry['result_size']=0
|
||||
logentry['count']=1
|
||||
logentry['schema_id'] = cube.schema_id.id
|
||||
log_id = pooler.get_pool(cr.dbname).get('olap.query.logs').create(cr,uid,logentry)
|
||||
# count = pooler.get_pool(cr.dbname).get('olap.query.logs').browse(cr, uid, log_id, context)
|
||||
# pooler.get_pool(cr.dbname).get('olap.query.logs').write(cr, uid, log_id, {'count':count.count+1})
|
||||
return log_id
|
||||
return -1
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1,42 +0,0 @@
|
||||
|
||||
import sqlalchemy
|
||||
import common
|
||||
|
||||
class slicer(object):
|
||||
def __init__(self, slicer):
|
||||
self.slicer = slicer
|
||||
|
||||
def validate(self, cube):
|
||||
self.object = cube
|
||||
for slicer in self.slicer:
|
||||
slicer.validate(cube)
|
||||
|
||||
def __repr__(self):
|
||||
res = '\t<olap.slicer\n'
|
||||
res += str(self.slicer)
|
||||
res += '\t>'
|
||||
return res
|
||||
|
||||
#
|
||||
# Output:
|
||||
# a list of grouped values that can be computed at once
|
||||
# a group is defined by elements having the same query
|
||||
#
|
||||
# [
|
||||
# {
|
||||
# 'level': ["Time","2008","Q1"],
|
||||
# 'value': '1er Trim 2008',
|
||||
# 'query': SQLAlchemy query object
|
||||
# }
|
||||
# ]
|
||||
#
|
||||
def run(self, metadata):
|
||||
print '*'*40
|
||||
print self.slicer
|
||||
result = []
|
||||
for slicer_line in self.slicer:
|
||||
res = slicer_line.run(metadata)
|
||||
result += slicer_line.run(metadata)
|
||||
return result
|
||||
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1,270 +0,0 @@
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
|
||||
#
|
||||
# WARNING: This program as such is intended to be used by professional
|
||||
# programmers who take the whole responsability of assessing all potential
|
||||
# consequences resulting from its eventual inadequacies and bugs
|
||||
# End users who are looking for a ready-to-use solution with commercial
|
||||
# garantees and support are strongly adviced to contract a Free Software
|
||||
# Service Company
|
||||
#
|
||||
# This program is Free Software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
##############################################################################
|
||||
import locale
|
||||
import mdx_input
|
||||
import sqlalchemy
|
||||
from sqlalchemy import *
|
||||
import common
|
||||
import slicer
|
||||
import datetime
|
||||
import pooler
|
||||
import copy
|
||||
import pyparsing
|
||||
from pyparsing import *
|
||||
|
||||
class warehouse(object):
|
||||
def create_table(self, connection, table_name, data):
|
||||
measures = data[0].keys()
|
||||
measures.pop(measures.index('name'))
|
||||
engine = create_engine(connection, echo=False)
|
||||
metadata = MetaData()
|
||||
tab = Table(str(table_name), metadata,
|
||||
Column('name', String(100)),
|
||||
Column('parent_id', String(100)),
|
||||
Column('id', String(100))
|
||||
)
|
||||
for msr in measures:
|
||||
colmn = Column(msr, String(100))
|
||||
tab.append_column(colmn)
|
||||
|
||||
metadata.create_all(engine)
|
||||
result = engine.execute(tab.insert(), data)
|
||||
return {}
|
||||
|
||||
def log(self,cr,uid,cube,query,data,connection,context={}):
|
||||
if not context==False:
|
||||
log_ids = pooler.get_pool(cr.dbname).get('olap.query.logs').search( cr, uid, [('query','=', query), ('user_id','=', uid)])
|
||||
if log_ids:
|
||||
count = pooler.get_pool(cr.dbname).get('olap.query.logs').browse(cr, uid, log_ids, context)[0]
|
||||
counter = count.count + 1
|
||||
table_name = ''
|
||||
if counter>=3:
|
||||
if len(data[0]) == 2:
|
||||
rows = data[0][0]
|
||||
columns = data[0][1]
|
||||
datas = data[1]
|
||||
result = []
|
||||
|
||||
parent_list = [ rw[0] for rw in rows]
|
||||
|
||||
for element in range(len(rows)):
|
||||
res = {}
|
||||
check_element = rows[element][0][:rows[element][0].index(rows[element][1])]
|
||||
if check_element:
|
||||
res['parent_id'] = str(parent_list.index(check_element))
|
||||
res['id'] = str(element)
|
||||
else:
|
||||
res['parent_id'] = str(None)
|
||||
res['id'] = str(element)
|
||||
res['name'] = str(rows[element][1])
|
||||
for col in range(len(columns)):
|
||||
col_elem = columns[col][0][:columns[col][0].index(columns[col][1])+1]
|
||||
c_element = '.'.join(map(lambda x: str(x), col_elem))
|
||||
res[c_element] = str(datas[element][col][0])
|
||||
result.append(res)
|
||||
table_name = cube.name+'_'+str(count.id)+'_'+str(counter)
|
||||
self.create_table(connection,table_name, result)
|
||||
elif len(data[0]) == 3:
|
||||
print "Its for Pages:>>>>>>>>>"
|
||||
pooler.get_pool(cr.dbname).get('olap.query.logs').write(cr, uid, log_ids, {'count':counter, 'table_name': table_name})
|
||||
return True
|
||||
else:
|
||||
logentry={}
|
||||
logentry['user_id']=uid
|
||||
logentry['cube_id']=cube.id
|
||||
logentry['query']=query
|
||||
logentry['time']= str(datetime.datetime.now())
|
||||
logentry['result_size']=0
|
||||
logentry['count']=1
|
||||
logentry['schema_id'] = cube.schema_id.id
|
||||
log_id = pooler.get_pool(cr.dbname).get('olap.query.logs').create(cr,uid,logentry)
|
||||
return log_id
|
||||
return -1
|
||||
|
||||
def run(self, currency, qry_obj):
|
||||
schema = qry_obj.schema_id
|
||||
table_name = str(qry_obj.table_name)
|
||||
connection = schema.database_id.connection_url
|
||||
engine = create_engine(connection, echo=False)
|
||||
metadata = MetaData(engine)
|
||||
metadata.create_all(engine)
|
||||
tab = Table(table_name, metadata, autoload=True, autoload_with=engine)
|
||||
total_columns = [c.name for c in tab.columns]
|
||||
columns = []
|
||||
cols = []
|
||||
for c in tab.columns:
|
||||
if not c.name.__contains__('name') and not c.name.__contains__('id') and not c.name.__contains__('parent_id'):
|
||||
columns.append(c.name)
|
||||
cols.append((c.name.split('.'), str(c.name.split('.')[1])))
|
||||
result = tab.select().execute()
|
||||
res = result.fetchall()
|
||||
rows = []
|
||||
# dt = [[[]] * len(columns)] * len(res)
|
||||
for r in range(len(res)):
|
||||
if res[r][1] == str(None):
|
||||
rows.append(([str(res[r][0])], str(res[r][0])))
|
||||
else:
|
||||
rows.append(([str(res[int(res[r][1])][0]),str(res[r][0])], str(res[r][0])))
|
||||
|
||||
data = []
|
||||
for r in range(len(res)):
|
||||
data.append(res[r][3:])
|
||||
|
||||
datas = []
|
||||
for dd in range(len(data)):
|
||||
datas.append([])
|
||||
for d in range(len(data[dd])):
|
||||
datas[dd].append([str(data[dd][d])])
|
||||
|
||||
final_result = ([rows, cols], datas)
|
||||
return final_result
|
||||
|
||||
def match_table(self, cr, uid,request, context):
|
||||
qry_obj = pooler.get_pool(cr.dbname).get('olap.query.logs')
|
||||
result = self.parse_query(request)
|
||||
qry = result[1][0]
|
||||
qry_axis = result[0]
|
||||
qry_id = qry_obj.search(cr, uid, [('query','=',str(qry))])
|
||||
result = ()
|
||||
if qry_id:
|
||||
qry = qry_obj.browse(cr, uid, qry_id)[0]
|
||||
schema = qry.schema_id
|
||||
if qry.table_name !='':
|
||||
total_rows = []
|
||||
total_cols = []
|
||||
data = []
|
||||
table_name = str(qry.table_name)
|
||||
connection = schema.database_id.connection_url
|
||||
engine = create_engine(connection, echo=False)
|
||||
metadata = MetaData(engine)
|
||||
metadata.create_all(engine)
|
||||
tab = Table(table_name, metadata, autoload=True, autoload_with=engine)
|
||||
total_columns = [c.name for c in tab.columns]
|
||||
res = tab.select().execute().fetchall()
|
||||
for val in range(len(res)):
|
||||
for row in range(len(res[val])):
|
||||
if total_columns[row]!='parent_id' and total_columns[row]!='id':
|
||||
if total_columns[row] == 'name':
|
||||
total_rows.append((str(res[val][row]).split("."), str(res[val][row]).split(".")[-1]))
|
||||
else:
|
||||
total_cols.append((str(total_columns[row]).split("."), str(total_columns[row]).split(".")[-1]))
|
||||
data.append([[str(res[val][row])]])
|
||||
res_1 = []
|
||||
res_1.append(total_rows)
|
||||
res_1.append(total_cols)
|
||||
result = (res_1, data)
|
||||
return result
|
||||
|
||||
def parse_query(self, query):
|
||||
result = []
|
||||
lrbrack, rrbrack = map( Suppress, "()" )
|
||||
comma = Suppress( "," )
|
||||
leftCurlBr, rightCurlBr = map( Suppress, "{}" )
|
||||
dot = Suppress( "." )
|
||||
crossToken = Literal( "crossjoin" ).suppress()
|
||||
selectToken = Keyword( "select", caseless = True ).suppress()
|
||||
fromToken = Keyword( "from", caseless = True ).suppress()
|
||||
whereToken = Keyword( "where", caseless = True ).suppress()
|
||||
|
||||
scalar = Word( alphanums + "_" + " " + "-" + "+")
|
||||
cube = Word( alphas + '_' )
|
||||
level_scalar = Word( alphanums + "_" + " " )
|
||||
level_filter = Suppress( "[" ) + level_scalar + Suppress( "]" )
|
||||
level_function = Keyword( "children", caseless = True )
|
||||
level_item = level_filter | level_function
|
||||
levels = Group( level_item + Optional( dot + delimitedList( level_item, ".", combine = False ) ) )
|
||||
axis_parser = delimitedList( levels, ",", combine = False )
|
||||
where_parse = lrbrack + Group( delimitedList( levels , ",", combine = False ) ) + rrbrack
|
||||
|
||||
cross_parser = leftCurlBr + levels + rightCurlBr
|
||||
crossx = Forward()
|
||||
cross_mdx = crossx | leftCurlBr + axis_parser + rightCurlBr
|
||||
crossx << ( crossToken + lrbrack + cross_mdx + comma + Group( cross_parser.setResultsName( "cross" ) ) + rrbrack )
|
||||
|
||||
rowsmdx = leftCurlBr + axis_parser + rightCurlBr
|
||||
colsmdx = leftCurlBr + axis_parser + rightCurlBr
|
||||
pagemdx = leftCurlBr + axis_parser + rightCurlBr
|
||||
row_mdx_axis = rowsmdx | crossx
|
||||
col_mdx_axis = colsmdx | crossx
|
||||
row_names = ["rows", "columns", "pages"]
|
||||
onToken = Keyword( "on", caseless = True ).suppress()
|
||||
page_name = oneOf( ' '.join( row_names ) ).suppress()
|
||||
|
||||
query_parser = selectToken + Group( row_mdx_axis ) + onToken + page_name + Optional( comma + Group( col_mdx_axis ) + onToken + page_name ) \
|
||||
+ Optional( comma + Group( pagemdx ) + onToken + page_name )\
|
||||
+ fromToken + cube.suppress() + Optional( whereToken + Group(where_parse ))
|
||||
qr = query_parser.parseString(query)
|
||||
axes = [[],[], []]
|
||||
crossjoins=[[],[],[]]
|
||||
ax = 0
|
||||
for items in qr:
|
||||
for i in items:
|
||||
# if ax == 2:
|
||||
# if len( items ) > 1:
|
||||
# for t in i:
|
||||
# conditions.append( list(t) )
|
||||
# else:
|
||||
# conditions.append( list(i))
|
||||
if i.cross:
|
||||
if i[0][-1] == 'children':
|
||||
crossjoins[ax].append( '.'.join(map(lambda x: "[" + x +"]",i[0][:-1]))+".children")
|
||||
else:
|
||||
crossjoins[ax].append( '.'.join(map(lambda x: "[" + x +"]",i[0])))
|
||||
else:
|
||||
if i[-1] == 'children':
|
||||
axes[ax].append( '.'.join(map(lambda x: "[" + x +"]",i[:-1]))+".children")
|
||||
else:
|
||||
axes[ax].append( '.'.join(map(lambda x: "[" + x +"]",i)))
|
||||
ax = ax + 1
|
||||
|
||||
result.append(axes)
|
||||
result.append(crossjoins)
|
||||
qry_list = [[], []]
|
||||
t_qry = []
|
||||
new_query = ''
|
||||
|
||||
for x in range(len(axes)):
|
||||
qry_select = 'select {'
|
||||
if x == 0:
|
||||
rs = axes[x][:-1]
|
||||
if rs:
|
||||
t_qry.append(rs)
|
||||
rs_axis = ','.join(rs)
|
||||
new_query = qry_select + rs_axis + '} on rows,'
|
||||
elif x == 1:
|
||||
cs_axis = ','.join(axes[x])
|
||||
if cs_axis:
|
||||
t_qry.append(cs_axis)
|
||||
new_query = new_query + ' {' + cs_axis + '} on columns from Sales'
|
||||
|
||||
qry_list[0].append(t_qry)
|
||||
qry_list[1].append(new_query)
|
||||
|
||||
# else:
|
||||
# print "pages"
|
||||
return qry_list
|
||||
|
||||
@@ -1,682 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Wizard view for the load data -->
|
||||
|
||||
<record id="bi_load_db_form" model="ir.ui.view">
|
||||
<field name="name">bi.load.db.form</field>
|
||||
<field name="model">bi.load.db.wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Load Database Tables">
|
||||
<label align="0.0" string="We will load the complete structure of the database by introspection, so that you will be able to work on it, and specify a better structure according to your reporting needs." colspan="4" />
|
||||
<newline/>
|
||||
<label align="0.0" string="After having loaded the structure, you will be able to hide/show or rename tables and columns to simplify end-users interface. The following database will be loaded:" colspan="4"/>
|
||||
<newline/>
|
||||
<field name="fact_table" />
|
||||
<field name="db_name" />
|
||||
<newline/>
|
||||
<button name="action_cancel" string="Cancel" type="object" colspan="2"/>
|
||||
<button name="action_load" string="Load Data Structure" type="object" colspan="2"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="act_bi_load_db_wizard" model="ir.actions.act_window">
|
||||
<field name="name">Load database Structure</field>
|
||||
<field name="res_model">bi.load.db.wizard</field>
|
||||
<field name="src_model">olap.schema</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="auto_refresh" eval="1"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Wizard For Olap Warehouse -->
|
||||
|
||||
<record id="view_warehouse_bi" model="ir.ui.view">
|
||||
<field name="name">Olap Warehouse</field>
|
||||
<field name="model">olap.warehouse.wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Warehouse">
|
||||
<group colspan="16">
|
||||
<separator string="Query" colspan="16"/>
|
||||
<field name="query" nolabel="1" colspan="16"/>
|
||||
<button string="Ok" name="action_ok" colspan="16" type="object" icon='gtk-ok'/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_olap_warehouse" model="ir.actions.act_window">
|
||||
<field name="name">Olap Warehouse</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">olap.warehouse.wizard</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Olap Warehouse"
|
||||
action="action_olap_warehouse"
|
||||
id="menu_bi_warehouse"
|
||||
sequence="51"
|
||||
parent="base.next_id_50"
|
||||
/>
|
||||
|
||||
<!-- Wizard View for the parameters wizard -->
|
||||
|
||||
<record id="view_config_bi" model="ir.ui.view">
|
||||
<field name="name">Parameters Configuration</field>
|
||||
<field name="model">olap.parameters.config.wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Business Intelligence Server Configuration">
|
||||
<group colspan="4" col="8">
|
||||
<group colspan="3" width="220" height="250">
|
||||
<field name="config_logo" widget="image" width="220" height="130" nolabel="1" colspan="1"/>
|
||||
<newline/>
|
||||
<label align="0.0" string="This wizard will automatically configure the web client for Business Intelligence." width="200" colspan="2"/>
|
||||
</group>
|
||||
<group colspan="4">
|
||||
<separator string=" Business Intelligence Web Client" colspan="4"/>
|
||||
<field name="host_name" colspan="4"/>
|
||||
<field name="host_port" colspan="4"/>
|
||||
</group>
|
||||
<group colspan="8" col="8">
|
||||
<separator string="" colspan="8"/>
|
||||
<group colspan="4" width="220">
|
||||
<field name="progress" widget="progressbar" nolabel="1" colspan="2"/>
|
||||
</group>
|
||||
<button special="cancel" string="Cancel" name="action_cancel" type="object" icon='gtk-cancel'/>
|
||||
<button name="action_config" string="Configure" icon='gtk-ok' type="object"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_config_bi_parameters" model="ir.actions.act_window">
|
||||
<field name="name">Parameters Configuration</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">olap.parameters.config.wizard</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Server Parameters"
|
||||
action="action_config_bi_parameters"
|
||||
id="menu_bi_server_parameters"
|
||||
sequence="50"
|
||||
parent="base.next_id_50"
|
||||
/>
|
||||
|
||||
<record model="ir.actions.todo" id="config_auto_directory">
|
||||
<field name="name">Server Parameters Configuration</field>
|
||||
<field name="note">This wizard will configure the URL of the web client</field>
|
||||
<field name="action_id" ref="action_config_bi_parameters"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Wizard view for the Auto Configuring the data -->
|
||||
|
||||
<record id="bi_auto_configure_form" model="ir.ui.view">
|
||||
<field name="name">bi.auto.configure.form</field>
|
||||
<field name="model">bi.auto.configure.wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Auto Congifuring Tables">
|
||||
<label align="0.0" string="This will Auto Configure Application. This will help to increase the readability of the tables and columns by giving it meaningful and easy to comprehend name. You can hides particular data and columns by reconfiguring the structure option." colspan="4" />
|
||||
<field name="name" select="1" colspan="4"/>
|
||||
<newline/>
|
||||
<button name="action_cancel" string="Cancel" type="object" colspan="2"/>
|
||||
<button name="action_load" string="Auto Configure Structure" type="object" colspan="2"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="act_bi_auto_configure" model="ir.actions.act_window">
|
||||
<field name="name">Auto Configuration</field>
|
||||
<field name="res_model">bi.auto.configure.wizard</field>
|
||||
<field name="src_model">olap.schema</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="auto_refresh" eval="1"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Olap Schema
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_schema_tree">
|
||||
<field name="name">olap.schema.tree</field>
|
||||
<field name="model">olap.schema</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Olap Schema">
|
||||
<field name="name"/>
|
||||
<field name="database_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_schema_form">
|
||||
<field name="name">olap.schema.form</field>
|
||||
<field name="model">olap.schema</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Olap Schema">
|
||||
<field name="name" select="1" colspan="4"/>
|
||||
<field name="database_id" select="2" colspan="4"/>
|
||||
<field name="loaded" colspan="3"/>
|
||||
<button name="%(act_bi_load_db_wizard)d" string="Reload Structure" type="action" states="done"/>
|
||||
<field name="configure" colspan="3"/>
|
||||
<button name="%(bi_load_configuration_table)d"
|
||||
string="ReConfigure Structure" type="action"
|
||||
states="done" />
|
||||
<field name="ready" select="2" colspan="3"/>
|
||||
<separator string="Schema description" colspan="4"/>
|
||||
<field name="note" colspan="4" nolabel="1"/>
|
||||
<field name="state" select="2" colspan="2" />
|
||||
<group colspan="2">
|
||||
<button string="Connect to Database" name="dbconnect" states="none"/>
|
||||
<button string="Load Database Structure"
|
||||
name="%(act_bi_load_db_wizard)d" type="action"
|
||||
states="dbconnect" target="new" />
|
||||
<button string="Configure Manually" name="dbconfigure" states="dbload"/>
|
||||
<button string="Mark as Configured" name="dbready" states="dbconfigure"/>
|
||||
</group>
|
||||
<separator string="Auto Application Configuration" colspan="4"/>
|
||||
<field name="app_detect" nolabel="1" colspan="3"/>
|
||||
<button string="Configure Automatically "
|
||||
name="%(act_bi_auto_configure)d" type="action"
|
||||
states="dbload" target="new" />
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_olap_schema_form">
|
||||
<field name="name">Olap Schemas</field>
|
||||
<field name="res_model">olap.schema</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Olap Schema"
|
||||
action="action_olap_schema_form"
|
||||
id="menu_action_olap_schema_form"
|
||||
parent="menu_bi_conf_cubes"/>
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Olap Cubes Table
|
||||
# ------------------------------------------------------------------
|
||||
<record model="ir.ui.view" id="view_olap_cube_table_form">
|
||||
<field name="name">olap.cube.table.form</field>
|
||||
<field name="model">olap.cube.table</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Olap cube_table" >
|
||||
<field name="name" select="2"/>
|
||||
<field name="column_link_id" context="{'fk':True,'dim_x':context.get('d_id',False)}"/>
|
||||
<newline/>
|
||||
<separator colspan="2" string="Joined Tables"/>
|
||||
<field invisible="True" name="line_ids" nolabel="1">
|
||||
<form string="Database Tables">
|
||||
<field name="table_id"/>
|
||||
<field name="field_id"/>
|
||||
</form>
|
||||
<tree string="Database Tables">
|
||||
<field name="table_id"/>
|
||||
<field name="field_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="available_table_ids" colspan="4"
|
||||
nolabel="1" readonly="0"
|
||||
domain="[('available_table_ids','in',available_table_ids)]"
|
||||
context="{'flag':True,'master_dim':context.get('d_id',False),'master_schema':context.get('parent_schema_id',False),'link_col':column_link_id}">
|
||||
<tree string="Database Tables">
|
||||
<field name="related_to" string="Joined Table" />
|
||||
<field name="name" />
|
||||
<field name="table_id" />
|
||||
<field name="primary_key" />
|
||||
</tree>
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_olap_cube_table_form">
|
||||
<field name="name">Olap Cube Tables</field>
|
||||
<field name="res_model">olap.cube.table</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Olap Cubes Table"
|
||||
parent = "menu_bi_conf_cubes"
|
||||
action="action_olap_cube_table_form"
|
||||
id="menu_action_olap_cube_table_form"/>
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Olap Cubes
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_cube_tree">
|
||||
<field name="name">olap.cube.tree</field>
|
||||
<field name="model">olap.cube</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Olap cube">
|
||||
<field name="name"/>
|
||||
<field name="table_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_cube_form">
|
||||
<field name="name">olap.cube.form</field>
|
||||
<field name="model">olap.cube</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Olap cube">
|
||||
<field name="name" select="1" colspan="2"/>
|
||||
<field name="schema_id" select="1" attrs="{'readonly':[('schema_id','!=','')]}" colspan="2"/>
|
||||
<field name="table_id" context="{'parent_schema_id':schema_id}" colspan="2"/>
|
||||
<field name="query_log" select="2" colspan="2"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_olap_cube_form">
|
||||
<field name="name">Olap Cubes</field>
|
||||
<field name="res_model">olap.cube</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Olap Cubes"
|
||||
parent ="menu_bi_conf_cubes"
|
||||
action="action_olap_cube_form"
|
||||
id="menu_action_olap_cube_form"/>
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Olap Dimensions
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_dimension_tree">
|
||||
<field name="name">olap.dimension.tree</field>
|
||||
<field name="model">olap.dimension</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Olap dimension">
|
||||
<field name="name"/>
|
||||
<field name="cube_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_dimension_form">
|
||||
<field name="name">olap.dimension.form</field>
|
||||
<field name="model">olap.dimension</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Olap dimension">
|
||||
<field name="name" select="1"/>
|
||||
<field name="cube_id" select="1" attrs="{'readonly':[('cube_id','!=','')]}"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_olap_dimension_form">
|
||||
<field name="name">Olap Dimensions</field>
|
||||
<field name="res_model">olap.dimension</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Olap Dimension"
|
||||
parent = "menu_bi_conf_cubes"
|
||||
action="action_olap_dimension_form"
|
||||
id="menu_action_olap_dimension_form"/>
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Olap Hierarchies
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_hierarchy_tree">
|
||||
<field name="name">olap.hierarchy.tree</field>
|
||||
<field name="model">olap.hierarchy</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Olap hierarchy">
|
||||
<field name="name"/>
|
||||
<field name="dimension_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_hierarchy_form">
|
||||
<field name="name">olap.hierarchy.form</field>
|
||||
<field name="model">olap.hierarchy</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Olap hierarchy">
|
||||
<field name="name" select="1" colspan="2"/>
|
||||
<field name="sequence" colspan="2"/>
|
||||
<field name="dimension_id" select="1" attrs="{'readonly':[('dimension_id','!=','')]}" colspan="4"/>
|
||||
<field name="table_id" select="2" colspan="4" context="{'d_id':dimension_id}"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_olap_hierarchy_form">
|
||||
<field name="name">Olap Hierarchies</field>
|
||||
<field name="res_model">olap.hierarchy</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Olap Hierarchy"
|
||||
parent = "menu_bi_conf_cubes"
|
||||
action="action_olap_hierarchy_form"
|
||||
id="menu_action_olap_hierarchy_form"/>
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Olap Levels
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_level_tree">
|
||||
<field name="name">olap.level.tree</field>
|
||||
<field name="model">olap.level</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Olap Level">
|
||||
<field name="name"/>
|
||||
<field name="column_name"/>
|
||||
<field name="column_id_name" invisible="True"/>
|
||||
<field name="type"/>
|
||||
<field name="table_name" invisible="True"/>
|
||||
<field name="sequence"/>
|
||||
<field name="hierarchy_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_level_form">
|
||||
<field name="name">olap.level.form</field>
|
||||
<field name="model">olap.level</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Olap level">
|
||||
<field name="name" select="1" colspan="4"/>
|
||||
<field name="column_name" select="1"
|
||||
on_change="onchange_column_name(column_name)"
|
||||
context="{'filter_cols_hier':hierarchy_id}" />
|
||||
<field name="column_id_name" select="1"/>
|
||||
<field name="type" select="1"/>
|
||||
<field name="table_name" select="1"/>
|
||||
<field name="sequence"/>
|
||||
<field name="hierarchy_id" select="1" attrs="{'readonly':[('hierarchy_id','!=','')]}"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_olap_level_form">
|
||||
<field name="name">Olap Level</field>
|
||||
<field name="res_model">olap.level</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Olap Level"
|
||||
parent = "menu_bi_conf_cubes"
|
||||
action="action_olap_level_form"
|
||||
id="menu_action_olap_level_form"/>
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Olap Measure
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_measure_tree">
|
||||
<field name="name">olap.measure.tree</field>
|
||||
<field name="model">olap.measure</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Olap measure">
|
||||
<field name="name"/>
|
||||
<field name="cube_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_measure_form">
|
||||
<field name="name">olap.measure.form</field>
|
||||
<field name="model">olap.measure</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Olap measure">
|
||||
<field name="name" select="1"/>
|
||||
<field name="cube_id" select="1" attrs="{'readonly':[('cube_id','!=','')]}"/>
|
||||
<field name="value_column_id_name" invisible="True"/>
|
||||
<field name="table_name" invisible="True"/>
|
||||
<field name="measure_type"/>
|
||||
<group colspan="4" attrs="{'invisible':[('measure_type','!=','fact_column')]}">
|
||||
<newline/>
|
||||
<field name="value_column" select="1" attrs="{'required':[('measure_type','=','fact_column')]}" on_change="onchange_measure_name(value_column)" context="{'filter_cols_cube':cube_id}"/>
|
||||
<field name="agregator" select="2" />
|
||||
<field name="formatstring" select="2"/>
|
||||
</group>
|
||||
<group colspan="4" attrs="{'invisible':[('measure_type','!=','sql_expr')]}">
|
||||
<newline/>
|
||||
<separator string="SQL Expression" colspan="4"/>
|
||||
<field name="value_sql" colspan="4" select="2"
|
||||
attrs="{'required':[('measure_type','=','sql_expr')]}" nolabel="1" />
|
||||
<field name="datatype" select="2"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_olap_measure_form">
|
||||
<field name="name">Olap Measures</field>
|
||||
<field name="res_model">olap.measure</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Olap Measures"
|
||||
parent = "menu_bi_conf_cubes"
|
||||
action="action_olap_measure_form"
|
||||
id="menu_action_olap_measure_form"/>
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Olap Saved Query
|
||||
# ------------------------------------------------------------------
|
||||
<record model="ir.ui.view" id="view_olap_saved_query_form_tree">
|
||||
<field name="name">olap.saved.query.tree</field>
|
||||
<field name="model">olap.saved.query</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Olap Saved Query">
|
||||
<field name="name"/>
|
||||
<field name="cube_id"/>
|
||||
<field name="mdx_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="query"/>
|
||||
<field name="time"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_saved_query_form_mdx">
|
||||
<field name="name">olap.saved.query.mdx</field>
|
||||
<field name="model">olap.saved.query</field>
|
||||
<field name="type">mdx</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Olap Saved Query">
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="query"/>
|
||||
<field name="cube_id"/>
|
||||
<field name="mdx_id"/>
|
||||
<field name="axis_keys" readonly="True"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_saved_query_form">
|
||||
<field name="name">olap.saved.query.form</field>
|
||||
<field name="model">olap.saved.query</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Olap Saved Query">
|
||||
<group colspan="4">
|
||||
<field name="user_id" readonly="True"/>
|
||||
<field name="cube_id" select="2" readonly="True"/>
|
||||
<field name="mdx_id" select="2" readonly="True"/>
|
||||
<field name="schema_id" select="2" readonly="True"/>
|
||||
</group>
|
||||
<separator string="Query Name" colspan="4"/>
|
||||
<field name="name" select="1" readonly="True" nolabel="1"/>
|
||||
<separator string="Query" colspan="4"/>
|
||||
<field name="query" select="1" colspan="4" readonly="True" nolabel="1"/>
|
||||
<separator string="Axis Keys" colspan="4"/>
|
||||
<field name="axis_keys" readonly="True" nolabel="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_olap_saved_query_form">
|
||||
<field name="name">Olap Saved Query</field>
|
||||
<field name="res_model">olap.saved.query</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,mdx</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Olap Saved Query"
|
||||
parent = "menu_bi_conf_tools"
|
||||
action="action_olap_saved_query_form"
|
||||
id="menu_action_olap_saved_query_form"/>
|
||||
|
||||
<!-- All Logs -->
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_query_logs_tree">
|
||||
<field name="name">olap.query.logs</field>
|
||||
<field name="model">olap.query.logs</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="All Logs">
|
||||
<field name="user_id"/>
|
||||
<field name="query"/>
|
||||
<field name="cube_id"/>
|
||||
<field name="schema_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_query_logs_form">
|
||||
<field name="name">olap.query.logs.form</field>
|
||||
<field name="model">olap.query.logs</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="All Logs">
|
||||
<field name="cube_id" select="2" readonly="True" colspan="2"/>
|
||||
<field name="schema_id" readonly="True" colspan="2"/>
|
||||
<field name="time" select="2" readonly="True" colspan="4"/>
|
||||
<field name="result_size" select="2" readonly="True" colspan="2"/>
|
||||
<field name="count" readonly="True" colspan="2"/>
|
||||
<separator string="Query" colspan="4"/>
|
||||
<field name="query" colspan="4" select="1" readonly="True" nolabel="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_olap_query_logs_form">
|
||||
<field name="name">All Logs</field>
|
||||
<field name="res_model">olap.query.logs</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="All Logs"
|
||||
action="action_olap_query_logs_form"
|
||||
id="menu_action_olap_query_logs_form"
|
||||
parent="menu_bi_conf_tools"/>
|
||||
|
||||
<!-- All Logs / My logs -->
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_query_logs_my_tree">
|
||||
<field name="name">olap.query.logs</field>
|
||||
<field name="model">olap.query.logs</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="My Logs">
|
||||
<field name="user_id"/>
|
||||
<field name="query"/>
|
||||
<field name="cube_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_query_logs_my_tree">
|
||||
<field name="name">olap.query.logs</field>
|
||||
<field name="model">olap.query.logs</field>
|
||||
<field name="type">mdx</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="My Logs">
|
||||
<field name="user_id"/>
|
||||
<field name="query"/>
|
||||
<field name="cube_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Query Logs -->
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_query_logs_my_form">
|
||||
<field name="name">olap.query.logs.form</field>
|
||||
<field name="model">olap.query.logs</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="My Logs">
|
||||
<field name="user_id" select="1" readonly="True"/>
|
||||
<separator string="Query" colspan="4"/>
|
||||
<field name="query" colspan="4" select="1" readonly="True" nolabel="1"/>
|
||||
<field name="time" select="2" readonly="True"/>
|
||||
<field name="result_size" select="2" readonly="True"/>
|
||||
<field name="cube_id" select="2" readonly="True"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_olap_query_logs_my_form">
|
||||
<field name="name">My Logs</field>
|
||||
<field name="res_model">olap.query.logs</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,mdx</field>
|
||||
<field name="domain">[('user_id','=',uid)]</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="My Logs"
|
||||
action="action_olap_query_logs_my_form"
|
||||
id="menu_action_olap_query_logs_my_form"
|
||||
parent="menu_action_olap_query_logs_form"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,70 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record model="workflow" id="wkf_schema">
|
||||
<field name="name">olap.schema</field>
|
||||
<field name="osv">olap.schema</field>
|
||||
<field name="on_create">True</field>
|
||||
</record>
|
||||
|
||||
<record model="workflow.activity" id="act_none">
|
||||
<field name="wkf_id" ref="wkf_schema"/>
|
||||
<field name="flow_start">True</field>
|
||||
<field name="name">none</field>
|
||||
</record>
|
||||
|
||||
<record model="workflow.activity" id="act_dbconnect">
|
||||
<field name="wkf_id" ref="wkf_schema"/>
|
||||
<field name="name">dbconnect</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">action_dbconnect()</field>
|
||||
</record>
|
||||
|
||||
<record model="workflow.activity" id="act_dbload">
|
||||
<field name="wkf_id" ref="wkf_schema"/>
|
||||
<field name="name">dbload</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">action_dbload()</field>
|
||||
</record>
|
||||
|
||||
<record model="workflow.activity" id="act_dbconfigure">
|
||||
<field name="wkf_id" ref="wkf_schema"/>
|
||||
<field name="name">dbconfigure</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">action_dbconfigure()</field>
|
||||
</record>
|
||||
|
||||
<record model="workflow.activity" id="act_dbready">
|
||||
<field name="wkf_id" ref="wkf_schema"/>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="name">dbready</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">action_dbready()</field>
|
||||
</record>
|
||||
|
||||
<record model="workflow.transition" id="trans_none_dbconnect">
|
||||
<field name="act_from" ref="act_none"/>
|
||||
<field name="act_to" ref="act_dbconnect"/>
|
||||
<field name="signal">dbconnect</field>
|
||||
</record>
|
||||
|
||||
<record model="workflow.transition" id="trans_dbconnect_dbload">
|
||||
<field name="act_from" ref="act_dbconnect"/>
|
||||
<field name="act_to" ref="act_dbload"/>
|
||||
<field name="signal">dbload</field>
|
||||
</record>
|
||||
|
||||
<record model="workflow.transition" id="trans_dbload_dbconfigure">
|
||||
<field name="act_from" ref="act_dbload"/>
|
||||
<field name="act_to" ref="act_dbconfigure"/>
|
||||
<field name="signal">dbconfigure</field>
|
||||
</record>
|
||||
|
||||
<record model="workflow.transition" id="trans_dbconfigure_dbready">
|
||||
<field name="act_from" ref="act_dbconfigure"/>
|
||||
<field name="act_to" ref="act_dbready"/>
|
||||
<field name="signal">dbready</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,171 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="True">
|
||||
|
||||
<record model="olap.fact.database" id="fact_database_terp">
|
||||
<field name="name">Tiny ERP database</field>
|
||||
<field name="db_name">terp</field>
|
||||
<field name="db_login">postgres</field>
|
||||
<field name="db_password">postgres</field>
|
||||
</record>
|
||||
|
||||
<record model="olap.database.tables" id="database_table_res_partner">
|
||||
<field name="name">res_partner</field>
|
||||
<field name="table_db_name">res_partner</field>
|
||||
<field name="fact_database_id" ref="fact_database_terp"/>
|
||||
<field name="active">True</field>
|
||||
|
||||
</record>
|
||||
|
||||
<record model="olap.database.tables" id="database_table_res_user">
|
||||
<field name="name">res_users</field>
|
||||
<field name="table_db_name">res_users</field>
|
||||
<field name="fact_database_id" ref="fact_database_terp"/>
|
||||
<field name="active">True</field>
|
||||
|
||||
</record>
|
||||
|
||||
<record model="olap.database.columns" id="columns_res_partner_date">
|
||||
<field name="name">date</field>
|
||||
<field name="column_db_name">date</field>
|
||||
<field name="type">date</field>
|
||||
<field name="table_id" ref="database_table_res_partner"/>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
<record model="olap.database.columns" id="columns_res_user_create_uid">
|
||||
<field name="name">create_uid</field>
|
||||
<field name="column_db_name">create_uid</field>
|
||||
<field name="type">int4</field>
|
||||
<field name="table_id" ref="database_table_res_user"/>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
<record model="olap.database.columns" id="columns_res_user_id">
|
||||
<field name="name">id</field>
|
||||
<field name="column_db_name">id</field>
|
||||
<field name="type">int4</field>
|
||||
<field name="table_id" ref="database_table_res_user"/>
|
||||
<field name="primary_key">True</field>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
<record model="olap.database.columns" id="columns_res_partner_id">
|
||||
<field name="name">id</field>
|
||||
<field name="column_db_name">id</field>
|
||||
<field name="type">int4</field>
|
||||
<field name="table_id" ref="database_table_res_partner"/>
|
||||
<field name="primary_key">True</field>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
<record model="olap.database.columns" id="columns_res_user_name">
|
||||
<field name="name">name</field>
|
||||
<field name="column_db_name">name</field>
|
||||
<field name="type">varchar</field>
|
||||
<field name="table_id" ref="database_table_res_user"/>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
<record model="olap.database.columns" id="columns_res_partner_credit_limit">
|
||||
<field name="name">credit_limit</field>
|
||||
<field name="column_db_name">credit_limit</field>
|
||||
<field name="type">int4</field>
|
||||
<field name="table_id" ref="database_table_res_partner"/>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="olap.database.columns" id="columns_res_partner_user_id">
|
||||
<field name="name">user_id</field>
|
||||
<field name="column_db_name">user_id</field>
|
||||
<field name="type">int4</field>
|
||||
<field name="table_id" ref="database_table_res_partner"/>
|
||||
<field name="related_to" ref="database_table_res_user"></field>
|
||||
<field name="active">True</field>
|
||||
|
||||
</record>
|
||||
<record model="olap.schema" id="schema_main">
|
||||
<field name="name">tinyerp</field>
|
||||
<field name="state">none</field>
|
||||
<field name="database_id" ref="fact_database_terp"/>
|
||||
</record>
|
||||
|
||||
<record model="olap.cube.table" id="table_res_partner">
|
||||
<field name="name">Partner</field>
|
||||
<field name="schema_id" ref="schema_main"/>
|
||||
<field name="column_link_id" ref="columns_res_partner_id"/>
|
||||
</record>
|
||||
<record model="olap.cube.table" id="table_res_user">
|
||||
<field name="name">Partner(User)</field>
|
||||
<field name="schema_id" ref="schema_main"/>
|
||||
<field name="column_link_id" ref="columns_res_partner_user_id"/>
|
||||
</record>
|
||||
<record model="olap.cube" id="cube_partner">
|
||||
<field name="name">Partner</field>
|
||||
<field name="table_id" ref="table_res_partner"/>
|
||||
<field name="schema_id" ref="schema_main"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="olap.dimension" id="dimension_date">
|
||||
<field name="name">Date</field>
|
||||
<field name="cube_id" ref="cube_partner"/>
|
||||
</record>
|
||||
<record model="olap.hierarchy" id="hierarchy_date">
|
||||
<field name="name">Date</field>
|
||||
<field name="dimension_id" ref="dimension_date"/>
|
||||
<field name="primary_key_table">res_partner</field>
|
||||
<field name="table_id" ref="table_res_partner"/>
|
||||
</record>
|
||||
<record model="olap.level" id="hierarchy_level_date">
|
||||
<field name="name">Date</field>
|
||||
<field name="column_name" ref="columns_res_partner_date"></field>
|
||||
<field name="column_id_name">date</field>
|
||||
<field name="type">date_year</field>
|
||||
<field name="table_name">res_partner</field>
|
||||
<field name="hierarchy_id" ref="hierarchy_date"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="olap.dimension" id="dimension_user">
|
||||
<field name="name">User</field>
|
||||
<field name="cube_id" ref="cube_partner"/>
|
||||
</record>
|
||||
|
||||
<record model="olap.hierarchy" id="hierarchy_user">
|
||||
<field name="name">User</field>
|
||||
<field name="dimension_id" ref="dimension_user"/>
|
||||
<field name="primary_key_table">res_users</field>
|
||||
<field name="table_id" ref="table_res_user"/>
|
||||
</record>
|
||||
<record model="olap.level" id="hierarchy_user_level">
|
||||
<field name="name">Name</field>
|
||||
<field name="column_id_name">name</field>
|
||||
<field name="column_name" ref="columns_res_user_name"></field>
|
||||
<field name="table_name">res_users</field>
|
||||
<field name="hierarchy_id" ref="hierarchy_user"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="olap.measure" id="measure_credit_limit">
|
||||
<field name="name">Credit Limit</field>
|
||||
<field name="cube_id" ref="cube_partner"/>
|
||||
<field name="value_column" ref="columns_res_partner_credit_limit"></field>
|
||||
<field name="value_column_id_name">credit_limit</field>
|
||||
<field name="table_name">res_partner</field>
|
||||
</record>
|
||||
|
||||
<record model="olap.measure" id="measure_count">
|
||||
<field name="name">Count</field>
|
||||
<field name="cube_id" ref="cube_partner"/>
|
||||
<field name="value_column" ref="columns_res_partner_id"></field>
|
||||
<field name="value_column_id_name">id</field>
|
||||
<field name="table_name">res_partner</field>
|
||||
<field name="agregator">count</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="olap.application" id="application_openerp">
|
||||
<field name="name">OpenERP</field>
|
||||
<field name="query">select * from res_users</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,339 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Fact databases
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_fact_database_tree">
|
||||
<field name="name">olap.fact.database.tree</field>
|
||||
<field name="model">olap.fact.database</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Olap fact database">
|
||||
<field name="name"/>
|
||||
<field name="db_name"/>
|
||||
<field name="type"/>
|
||||
<field name="loaded"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_olap_fact_database_form">
|
||||
<field name="name">olap.fact.database.form</field>
|
||||
<field name="model">olap.fact.database</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Fact database">
|
||||
<notebook>
|
||||
<page string="Information">
|
||||
<separator string="General information" colspan="4"/>
|
||||
<field name="name" select="1" colspan="4"/>
|
||||
<field name="db_name" select="2"/>
|
||||
<field name="type" select="2"/>
|
||||
<separator string="Connection parameters" colspan="4"/>
|
||||
<field name="connection_type"/>
|
||||
<newline/>
|
||||
<field name="db_host"/>
|
||||
<field name="db_port"/>
|
||||
<field name="db_login"/>
|
||||
<field name="db_password" password="True"/>
|
||||
<field name="loaded"/>
|
||||
<separator string="Connection url" colspan="4"/>
|
||||
<field name="connection_url" nolabel="1" colspan="2"/>
|
||||
<button name="test_connection" string="Test Connection" type="object" colspan="2"/>
|
||||
</page>
|
||||
<page string="Tables">
|
||||
<field name="table_ids" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_view_olap_fact_database_form">
|
||||
<field name="name">Fact Databases</field>
|
||||
<field name="res_model">olap.fact.database</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Databases"
|
||||
action="action_view_olap_fact_database_form"
|
||||
id="menu_view_olap_fact_database_form"
|
||||
parent="menu_bi_conf_fact"/>
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Fact Database Tables
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_database_tables_tree">
|
||||
<field name="name">olap.database.tables.tree</field>
|
||||
<field name="model">olap.database.tables</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Olap database tables">
|
||||
<field name="name"/>
|
||||
<field name="table_db_name"/>
|
||||
<field name="fact_database_id" select="2"/>
|
||||
<field name="active"/>
|
||||
<field name="hide"/>
|
||||
<button name="hide_col" string="Hide" type="object"/>
|
||||
<button name="show_col" string="Show" type="object"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_olap_database_tables_form">
|
||||
<field name="name">olap.database.tables.form</field>
|
||||
<field name="model">olap.database.tables</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Database tables">
|
||||
<field name="name" select="1" colspan="2"/>
|
||||
<field name="table_db_name"/>
|
||||
<field name="columns" colspan="4" mode="tree" nolabel="1">
|
||||
<tree string="Olap database columns">
|
||||
<field name="name"/>
|
||||
<field name="column_db_name"/>
|
||||
<field name="type"/>
|
||||
<field name="table_id"/>
|
||||
<field name="primary_key"/>
|
||||
<field name="related_to"/>
|
||||
<field name="active"/>
|
||||
<field name="hide"/>
|
||||
<button name="hide_col" string="Hide" type="object"/>
|
||||
<button name="show_col" string="Show" type="object"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="fact_database_id" select="1" colspan="2"/>
|
||||
<field name="active"/>
|
||||
<field name="hide"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_view_olap_database_tables_form">
|
||||
<field name="name">Database Tables</field>
|
||||
<field name="res_model">olap.database.tables</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Tables"
|
||||
action="action_view_olap_database_tables_form"
|
||||
id="menu_view_olap_database_tables_form"
|
||||
parent="menu_bi_conf_fact"/>
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Fact Database Columns
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_database_columns_tree">
|
||||
<field name="name">olap.database.columns.tree</field>
|
||||
<field name="model">olap.database.columns</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="priority">2</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Olap database columns">
|
||||
<field name="name"/>
|
||||
<field name="column_db_name"/>
|
||||
<field name="type"/>
|
||||
<field name="table_id"/>
|
||||
<field name="primary_key"/>
|
||||
<field name="related_to"/>
|
||||
<field name="active"/>
|
||||
<field name="hide"/>
|
||||
<button name="hide_col" string="Hide" type="object"/>
|
||||
<button name="show_col" string="Show" type="object"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_database_columns_tree_m20">
|
||||
<field name="name">olap.database.columns.tree.m20</field>
|
||||
<field name="model">olap.database.columns</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="priority">1</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Olap database columns">
|
||||
<field name="name"/>
|
||||
<field name="column_db_name"/>
|
||||
<field name="table_id"/>
|
||||
<field name="related_to"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_database_columns_form">
|
||||
<field name="name">olap.database.columns.form</field>
|
||||
<field name="model">olap.database.columns</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Database columns">
|
||||
<field name="name" select="1" colspan="2"/>
|
||||
<field name="column_db_name"/>
|
||||
<field name="type"/>
|
||||
<field name="table_id" select="1" colspan="2"/>
|
||||
<field name="primary_key"/>
|
||||
<field name="related_to"/>
|
||||
<field name="active"/>
|
||||
<field name="hide"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_view_olap_database_columns_form">
|
||||
<field name="name">Database Columns</field>
|
||||
<field name="res_model">olap.database.columns</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_view_olap_database_columns_form">
|
||||
<field name="name">Database Columns</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="res_model">olap.database.columns</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_olap_database_columns_tree"></field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Columns"
|
||||
action="action_view_olap_database_columns_form"
|
||||
id="menu_view_olap_database_columns_form"
|
||||
parent="menu_bi_conf_fact"/>
|
||||
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Olap Application
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_application_tree">
|
||||
<field name="name">olap.application.tree</field>
|
||||
<field name="model">olap.application</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Olap Application">
|
||||
<field name="name"/>
|
||||
<field name="query"/>
|
||||
<field name="table_ids"/>
|
||||
<field name="field_ids"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_olap_application_form">
|
||||
<field name="name">olap.application.form</field>
|
||||
<field name="model">olap.application</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Olap Application">
|
||||
<newline/>
|
||||
<field name="name" select="1" colspan="2"/>
|
||||
<separator colspan="4" string="Application query"/>
|
||||
<field name="query" select="1" colspan="4" nolabel="1"/>
|
||||
<field name="table_ids" select="1" colspan="4" nolabel="1"/>
|
||||
<field name="field_ids" select="1" colspan="4" nolabel="1" rowspan="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_view_olap_application_form">
|
||||
<field name="name">Olap Applicatiion</field>
|
||||
<field name="res_model">olap.application</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Application"
|
||||
action="action_view_olap_application_form"
|
||||
id="menu_view_olap_application_form"
|
||||
parent="menu_bi_conf_known_application"/>
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Olap Application table
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_application_table_tree">
|
||||
<field name="name">olap.application.table.tree</field>
|
||||
<field name="model">olap.application.table</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Olap Application Table">
|
||||
<field name="name"/>
|
||||
<field name="table_name"/>
|
||||
<field name="is_hidden"/>
|
||||
<field name="application_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_olap_application_table_form">
|
||||
<field name="name">olap.application.table.form</field>
|
||||
<field name="model">olap.application.table</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Olap Application Table">
|
||||
<newline/>
|
||||
<field name="name" select="1" colspan="2"/>
|
||||
<field name="table_name" select="1" />
|
||||
<field name="application_id" select="1" />
|
||||
<field name="is_hidden" select="1" colspan="2" />
|
||||
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_view_olap_application_table_form">
|
||||
<field name="name">Olap Applicatiion Table</field>
|
||||
<field name="res_model">olap.application.table</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Application Table"
|
||||
action="action_view_olap_application_table_form"
|
||||
id="menu_view_olap_application_table_form"
|
||||
parent="menu_bi_conf_known_application"/>
|
||||
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Olap Application Field
|
||||
# --------------------------------------------------------------------
|
||||
|
||||
<record model="ir.ui.view" id="view_olap_application_field_tree">
|
||||
<field name="name">olap.application.field.tree</field>
|
||||
<field name="model">olap.application.field</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Olap Application Field">
|
||||
<field name="name"/>
|
||||
<field name="table_name"/>
|
||||
<field name="field_name"/>
|
||||
<field name="is_hidden" />
|
||||
<field name="application_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_olap_application_field_form">
|
||||
<field name="name">olap.application.field.form</field>
|
||||
<field name="model">olap.application.field</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Olap Application Field">
|
||||
<newline/>
|
||||
<field name="name" select="1" colspan="2"/>
|
||||
<field name="field_name" select="1" />
|
||||
<field name="table_name" select="1" />
|
||||
<field name="application_id" select="1" />
|
||||
<newline/>
|
||||
<field name="is_hidden" select="1" colspan="2"/>
|
||||
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_view_olap_application_field_form">
|
||||
<field name="name">Olap Applicatiion Field</field>
|
||||
<field name="res_model">olap.application.field</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Application Field"
|
||||
action="action_view_olap_application_field_form"
|
||||
id="menu_view_olap_application_field_form"
|
||||
parent="menu_bi_conf_known_application"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,155 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="access_olap_application" model="ir.model.access">
|
||||
<field name="name">Olap Application</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'olap.application')]"/>
|
||||
<field name="group_id" ref="base.group_system"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="True" name="perm_write"/>
|
||||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<record id="access_olap_application_field" model="ir.model.access">
|
||||
<field name="name">Olap Application Field</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'olap.application.field')]"/>
|
||||
<field name="group_id" ref="base.group_system"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="True" name="perm_write"/>
|
||||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<record id="access_olap_application_table" model="ir.model.access">
|
||||
<field name="name">Olap Application Table</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'olap.application.table')]"/>
|
||||
<field name="group_id" ref="base.group_system"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="True" name="perm_write"/>
|
||||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<record id="access_olap_cube" model="ir.model.access">
|
||||
<field name="name">Olap Cube</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'olap.cube')]"/>
|
||||
<field name="group_id" ref="base.group_system"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="True" name="perm_write"/>
|
||||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<record id="access_olap_cube_table" model="ir.model.access">
|
||||
<field name="name">Olap Cube Table</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'olap.cube.table')]"/>
|
||||
<field name="group_id" ref="base.group_system"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="True" name="perm_write"/>
|
||||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<record id="access_olap_cube_table_line" model="ir.model.access">
|
||||
<field name="name">Olap Cube Table Line</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'olap.cube.table.line')]"/>
|
||||
<field name="group_id" ref="base.group_system"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="True" name="perm_write"/>
|
||||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<record id="access_olap_database_columns" model="ir.model.access">
|
||||
<field name="name">Olap Database Columns</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'olap.database.columns')]"/>
|
||||
<field name="group_id" ref="base.group_system"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="True" name="perm_write"/>
|
||||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<record id="access_olap_database_tables" model="ir.model.access">
|
||||
<field name="name">Olap Database Tables</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'olap.database.tables')]"/>
|
||||
<field name="group_id" ref="base.group_system"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="True" name="perm_write"/>
|
||||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<record id="access_olap_dimension" model="ir.model.access">
|
||||
<field name="name">Olap Dimension</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'olap.dimension')]"/>
|
||||
<field name="group_id" ref="base.group_system"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="True" name="perm_write"/>
|
||||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<record id="access_olap_fact_database" model="ir.model.access">
|
||||
<field name="name">Olap Fact Database</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'olap.fact.database')]"/>
|
||||
<field name="group_id" ref="base.group_system"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="True" name="perm_write"/>
|
||||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<record id="access_olap_hierarchy" model="ir.model.access">
|
||||
<field name="name">Olap Hierarchy</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'olap.hierarchy')]"/>
|
||||
<field name="group_id" ref="base.group_system"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="True" name="perm_write"/>
|
||||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<record id="access_olap_level" model="ir.model.access">
|
||||
<field name="name">Olap Level</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'olap.level')]"/>
|
||||
<field name="group_id" ref="base.group_system"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="True" name="perm_write"/>
|
||||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<record id="access_olap_schema" model="ir.model.access">
|
||||
<field name="name">Olap Schema</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'olap.schema')]"/>
|
||||
<field name="group_id" ref="base.group_system"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="True" name="perm_write"/>
|
||||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<record id="access_olap_measure" model="ir.model.access">
|
||||
<field name="name">Olap Measure</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'olap.measure')]"/>
|
||||
<field name="group_id" ref="base.group_system"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="True" name="perm_write"/>
|
||||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
<record id="access_olap_query_logs" model="ir.model.access">
|
||||
<field name="name">Olap Query Logs</field>
|
||||
<field model="ir.model" name="model_id" search="[('model', '=', 'olap.query.logs')]"/>
|
||||
<field name="group_id" ref="base.group_system"/>
|
||||
<field eval="True" name="perm_read"/>
|
||||
<field eval="True" name="perm_write"/>
|
||||
<field eval="True" name="perm_create"/>
|
||||
<field eval="True" name="perm_unlink"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,69 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<menuitem icon="terp-graph" id="base.reporting_menu" name="Reporting" sequence="30"/>
|
||||
|
||||
<menuitem
|
||||
id="base.next_id_50"
|
||||
name="Configuration"
|
||||
parent="base.reporting_menu"
|
||||
groups="base.group_system"
|
||||
sequence="3"/>
|
||||
|
||||
<menuitem
|
||||
name="Custom Reports" id="base.menu_custom_reports"
|
||||
parent="base.reporting_menu" sequence="1"/>
|
||||
|
||||
<menuitem
|
||||
name="Businesss Intelligence Configuration"
|
||||
id="menu_bi_configuration"
|
||||
parent="base.next_id_50" sequence="1"/>
|
||||
|
||||
<menuitem
|
||||
name="Fact Databases"
|
||||
sequence="10"
|
||||
id="menu_bi_conf_fact"
|
||||
parent="menu_bi_configuration"/>
|
||||
|
||||
<menuitem
|
||||
name="Known Application"
|
||||
sequence="20"
|
||||
id="menu_bi_conf_known_application"
|
||||
parent="menu_bi_configuration"/>
|
||||
|
||||
<menuitem
|
||||
name="Olap Cubes"
|
||||
sequence="30"
|
||||
id="menu_bi_conf_cubes"
|
||||
parent="menu_bi_configuration"/>
|
||||
|
||||
<menuitem
|
||||
name="Tools"
|
||||
sequence="40"
|
||||
id="menu_bi_conf_tools"
|
||||
parent="menu_bi_configuration"/>
|
||||
|
||||
<menuitem name="Clear Logs" action="action_view_olap_query_logs_clear" icon="STOCK_EXECUTE"
|
||||
id="menu_bi_clear_logs" sequence="30" parent="menu_bi_conf_tools"/>
|
||||
|
||||
<record model="ir.actions.url" id="menu_url_cube_browser">
|
||||
<field name="name">name_menu_url_cube_browser</field>
|
||||
<field name="url">http://localhost:8080/browser</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Cube Browser" id="menu_browser_url" type="url"
|
||||
action="menu_url_cube_browser" parent="base.menu_custom_reports"
|
||||
sequence="1" />
|
||||
|
||||
<record model="ir.actions.url" id="menu_url_cube_designer">
|
||||
<field name="name">name_menu_url_cube_designer</field>
|
||||
<field name="url">http://localhost:8080/designer</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Cube Designer" sequence="60"
|
||||
action="menu_url_cube_designer" type="url" id="menu_designer_url"
|
||||
parent="base.next_id_50" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<wizard
|
||||
string="Query Builder"
|
||||
model="olap.schema"
|
||||
name="olap.query_builder"
|
||||
menu= "False"
|
||||
multi="True"
|
||||
id="bi_conf_cube_query_builder"/>
|
||||
|
||||
<wizard
|
||||
string="Load Tables"
|
||||
model="olap.schema"
|
||||
name="olap.load.table"
|
||||
menu= "False"
|
||||
multi="True"
|
||||
id="bi_menu_olap_load_table"/>
|
||||
|
||||
<wizard
|
||||
string="Open Configuration"
|
||||
model="olap.schema"
|
||||
name="olap.load.configuration.table"
|
||||
menu= "False"
|
||||
multi="True"
|
||||
id="bi_load_configuration_table"/>
|
||||
|
||||
<wizard
|
||||
string="Configure from Application"
|
||||
model="olap.schema"
|
||||
name="olap.application.configuration"
|
||||
multi="True"
|
||||
id="bi_application_configuration"/>
|
||||
|
||||
<wizard
|
||||
string="Test Connection"
|
||||
model="olap.fact.database"
|
||||
name="olap.fact.database.test_connection"
|
||||
menu="False"
|
||||
id="bi_test_connection"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
-2214
File diff suppressed because it is too large
Load Diff
@@ -1,2 +0,0 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"olap_saved_query","olap.saved.query","model_olap_saved_query","base.group_user",1,1,1,1
|
||||
|
@@ -1,111 +0,0 @@
|
||||
-
|
||||
In order to check olap module which is used to configure BI from OpenERP client.I create olap fact database record.
|
||||
-
|
||||
!record {model: olap.fact.database, id: olap_fact_database_openerp0}:
|
||||
connection_type: port
|
||||
db_host: localhost
|
||||
db_login: postgres
|
||||
db_name: tiny
|
||||
db_password: '123456'
|
||||
db_port: 5432
|
||||
name: OpenERP
|
||||
type: postgres
|
||||
-
|
||||
I will check the connection for successful login. >>>>>>(Problem)
|
||||
# !python {model: olap.fact.database}: |
|
||||
# self.test_connection(cr, uid,[ref('olap_fact_database_openerp0')], context)
|
||||
-
|
||||
In order to test schema,I create a new schema record.
|
||||
-
|
||||
!record {model: olap.schema, id: olap_schema_Partners0}:
|
||||
database_id: olap_fact_database_openerp0
|
||||
name: Partners
|
||||
-
|
||||
I press "Connect to Database" and I see that the Schema State is "Database Connected" now
|
||||
-
|
||||
!workflow {model: olap.schema, action: dbconnect, ref: olap_schema_Partners0}
|
||||
-
|
||||
Now I will load the structure of the database. by structure we mean tables, columns and the relations. This will help in defining cube easily.
|
||||
-
|
||||
!record {model: bi.load.db.wizard, id: bi_load_db_wizard_0}:
|
||||
db_name: OpenERP
|
||||
fact_table: Partners
|
||||
-
|
||||
I can see two buttons for Configuration one for manually and the other is for Automatically.I press "Configure Automatically".After configuration I can see that the Boolean Configuring Data-structure is True now Schema State is "The Structure is Configured" and there is one button "Mark as Configured"
|
||||
-
|
||||
!record {model: bi.auto.configure.wizard, id: bi_auto_configure_wizard_Partners0}:
|
||||
name: Partners
|
||||
-
|
||||
Performing a workflow action load on module olap.schema
|
||||
-
|
||||
!workflow {model: olap.schema, action: dbload, ref: olap_schema_Partners0}
|
||||
-
|
||||
Performing a workflow action configure on module olap.schema
|
||||
-
|
||||
!workflow {model: olap.schema, action: dbconfigure, ref: olap_schema_Partners0}
|
||||
-
|
||||
Performing a workflow action dbready on module olap.schema
|
||||
-
|
||||
!workflow {model: olap.schema, action: dbready, ref: olap_schema_Partners0}
|
||||
-
|
||||
In order to create Cube I first define the fact table.Fact table are the key tables in which measures are stored and we can branch to other tables for other parameters.
|
||||
-
|
||||
!record {model: olap.database.tables, id: database_table_res_partner}:
|
||||
active: True
|
||||
fact_database_id: fact_database_terp
|
||||
name: res_partner
|
||||
table_db_name: res_partner
|
||||
-
|
||||
I create cube table and select ID of as Relational Column.Then I select related record in Joined tables.
|
||||
-
|
||||
!record {model: olap.cube.table, id: olap_cube_table_partnercubetable0}:
|
||||
column_link_id: olap.columns_res_partner_id
|
||||
name: Partner cube table
|
||||
available_table_ids:
|
||||
- olap.columns_res_partner_date
|
||||
- olap.columns_res_partner_id
|
||||
- olap.columns_res_partner_credit_limit
|
||||
- olap.columns_res_partner_user_id
|
||||
|
||||
-
|
||||
I can configure Cube from BI Cube Designer.I make sure that OpenERP BI web-client is running.From Configuration I click on "Cube Designer" and It will open Cube Designer in my system browser.I can see that the schema "Partners" is visible through Cube Designer.
|
||||
-
|
||||
Creating olap cube
|
||||
-
|
||||
!record {model: olap.cube, id: olap_cube_partnercube0}:
|
||||
name: Partner cube
|
||||
query_log: true
|
||||
schema_id: olap_schema_Partners0
|
||||
table_id: olap_cube_table_partnercubetable0
|
||||
-
|
||||
After cube we can decide upon the dimensions to be used for the cube.In order to analyze Partner I create one dimension.
|
||||
-
|
||||
!record {model: olap.dimension, id: olap_dimension_products0}:
|
||||
name: Products
|
||||
cube_id: olap_cube_partnercube0
|
||||
-
|
||||
After adding the dimension I create hierarchy.
|
||||
-
|
||||
!record {model: olap.hierarchy, id: olap_hierarchy_allproducts0}:
|
||||
dimension_id: olap_dimension_products0
|
||||
name: All Products
|
||||
sequence: 1
|
||||
table_id: olap_cube_table_partnercubetable0
|
||||
-
|
||||
After adding the hierarchy I create level.I select Product's default_code as Columns Name that is loaded in Fact columns.
|
||||
-
|
||||
!record {model: olap.level, id: olap_level_productscode0}:
|
||||
column_id_name: name
|
||||
column_name: olap.columns_res_user_name
|
||||
hierarchy_id: olap_hierarchy_allproducts0
|
||||
name: Products code
|
||||
sequence: 1
|
||||
table_name: res_users
|
||||
type: normal
|
||||
-
|
||||
I will check that columns is loaded in Fact Table.
|
||||
-
|
||||
!python {model: olap.load.column}: |
|
||||
ids = self.search(cr, uid, [])
|
||||
self.get_table_data(cr, uid, ids, {'active_ids': [ref('olap_cube_table_partnercubetable0')]})
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import wizard_query_builder
|
||||
import wizard_load_data
|
||||
import wizard_load_configured_table
|
||||
import wizard_test_connection
|
||||
import olap_query_logs_clear
|
||||
import olap_load_column
|
||||
@@ -1,57 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import osv
|
||||
|
||||
class olap_load_column(osv.osv_memory):
|
||||
_name = "olap.load.column"
|
||||
_description = "Olap Load Column"
|
||||
|
||||
def get_table_data(self, cr, uid, ids, context={}):
|
||||
"""
|
||||
This function load column
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user\'s ID for security checks,
|
||||
@param ids: List of load column,
|
||||
@return: dictionary of database columns window on give id
|
||||
|
||||
"""
|
||||
data = context and context.get('active_id', False) or False
|
||||
ids_cols = self.pool.get('olap.database.columns').search(cr, uid, \
|
||||
([('table_id', '=', data)]), context={})
|
||||
model_data_ids = self.pool.get('ir.model.data').search(cr, uid, \
|
||||
[('model', '=', 'ir.ui.view'), \
|
||||
('name', '=', 'view_olap_database_columns_form')], context={})
|
||||
resource_id = self.pool.get('ir.model.data').read(cr, uid, \
|
||||
model_data_ids, fields=['res_id'])[0]['res_id']
|
||||
return {
|
||||
'domain': "[('id','in', ["+','.join(map(str,ids_cols))+"])]",
|
||||
'name': 'Database Columns',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'olap.database.columns',
|
||||
'views': [(False,'tree'),(resource_id,'form')],
|
||||
'type': 'ir.actions.act_window',
|
||||
}
|
||||
|
||||
olap_load_column()
|
||||
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Open Column From View -->
|
||||
|
||||
<record id="view_olap_load_column" model="ir.ui.view">
|
||||
<field name="name">Open Columns</field>
|
||||
<field name="model">olap.load.column</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="">
|
||||
<separator string=" " colspan="4"/>
|
||||
<button name="get_table_data" string="Open" type="object"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Open Column Action -->
|
||||
|
||||
<record id="action_olap_load_column" model="ir.actions.act_window">
|
||||
<field name="name">Open Columns</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">olap.load.column</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="context">{'record_id' : active_id}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<!-- Open Column Action Window -->
|
||||
|
||||
<act_window id="action_olap_load_column_values"
|
||||
key2="client_action_multi" name="Open Columns"
|
||||
res_model="olap.load.column" src_model="olap.database.columns"
|
||||
view_mode="form" target="new" view_type="form" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,74 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
|
||||
class olap_query_logs_clear(osv.osv_memory):
|
||||
_name = "olap.query.logs.clear"
|
||||
_description = "Olap Query Logs Clear"
|
||||
|
||||
_columns = {
|
||||
'user_name':fields.char('User', size=64, required=True, readonly=True),
|
||||
}
|
||||
|
||||
def _getdata(self, cr, uid, context={}):
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid)
|
||||
return user.name
|
||||
|
||||
_defaults = {
|
||||
'user_name': _getdata
|
||||
}
|
||||
|
||||
def clear_logs(self, cr, uid, part, context={}):
|
||||
"""
|
||||
This function load column
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current users ID for security checks,
|
||||
@param ids: List of load column,
|
||||
@return: dictionary of query logs clear message window
|
||||
"""
|
||||
ids = self.pool.get('olap.query.logs').search(cr, uid, [('user_id', '=', uid)])
|
||||
self.pool.get('olap.query.logs').unlink(cr, uid, ids, context)
|
||||
data_obj = self.pool.get('ir.model.data')
|
||||
id2 = data_obj._get_id(cr, uid, 'olap', 'view_olap_query_logs_clear_msg')
|
||||
if id2:
|
||||
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
|
||||
value = {
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'olap.query.logs.clear.msg',
|
||||
'views': [(id2, 'form'), (False, 'tree'), (False, 'calendar'), (False, 'graph')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new'
|
||||
}
|
||||
return value
|
||||
|
||||
olap_query_logs_clear()
|
||||
|
||||
|
||||
class olap_query_logs_clear_msg(osv.osv_memory):
|
||||
""" Display clear log message """
|
||||
_name = "olap.query.logs.clear.msg"
|
||||
_description = "Olap Query Logs Clear Message"
|
||||
|
||||
olap_query_logs_clear_msg()
|
||||
|
||||
# vim: ts=4 sts=4 sw=4 si et
|
||||
@@ -1,52 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Create Logs Form View -->
|
||||
|
||||
<record id="view_olap_query_logs_clear" model="ir.ui.view">
|
||||
<field name="name">Clear Logs</field>
|
||||
<field name="model">olap.query.logs.clear</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string=" To Load Data">
|
||||
<field name='user_name'/>
|
||||
<separator string="" colspan="4" />
|
||||
<label string="" colspan="2" />
|
||||
<group colspan="4">
|
||||
<button special="cancel" string="Cancel" />
|
||||
<button name="clear_logs" string="Clear Logs" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Create Logs Action -->
|
||||
|
||||
<record id="action_view_olap_query_logs_clear" model="ir.actions.act_window">
|
||||
<field name="name">Clear Logs </field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">olap.query.logs.clear</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<!-- Clear Logs Form View -->
|
||||
|
||||
<record id="view_olap_query_logs_clear_msg" model="ir.ui.view">
|
||||
<field name="name">Clear Logs Message</field>
|
||||
<field name="model">olap.query.logs.clear.msg</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Load Data">
|
||||
<label string="Logs Cleared successfully"/>
|
||||
<group colspan="4">
|
||||
<button special="cancel" string="Ok" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,61 +0,0 @@
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
|
||||
#
|
||||
# WARNING: This program as such is intended to be used by professional
|
||||
# programmers who take the whole responsability of assessing all potential
|
||||
# consequences resulting from its eventual inadequacies and bugs
|
||||
# End users who are looking for a ready-to-use solution with commercial
|
||||
# garantees and support are strongly adviced to contract a Free Software
|
||||
# Service Company
|
||||
#
|
||||
# This program is Free Software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
##############################################################################
|
||||
import time
|
||||
|
||||
import wizard
|
||||
import pooler
|
||||
import netsvc
|
||||
|
||||
class wizard_load_configured_table(wizard.interface):
|
||||
def _get_table_data(self, cr, uid, data, context={}):
|
||||
pool_obj = pooler.get_pool(cr.dbname)
|
||||
wf_service = netsvc.LocalService('workflow')
|
||||
wf_service.trg_validate(uid, 'olap.schema', data['id'], 'dbconfigure', cr)
|
||||
|
||||
lines=pool_obj.get('olap.schema').read(cr, uid, data['id'],context={})
|
||||
fact_ids=pool_obj.get('olap.database.tables').search(cr, uid, ([('fact_database_id','=',lines['database_id'][0])]),context={})
|
||||
model_data_ids = pool_obj.get('ir.model.data').search(cr,uid,[('model','=','ir.ui.view'),('name','=','view_olap_database_tables_form')],context={})
|
||||
resource_id = pool_obj.get('ir.model.data').read(cr,uid,model_data_ids,fields=['res_id'])[0]['res_id']
|
||||
|
||||
return {
|
||||
'domain': "[('id','in', ["+','.join(map(str,fact_ids))+"])]",
|
||||
'name': 'Database Tables',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'olap.database.tables',
|
||||
'views': [(False,'tree'),(resource_id,'form')],
|
||||
'type': 'ir.actions.act_window'
|
||||
}
|
||||
|
||||
states = {
|
||||
'init' : {
|
||||
'actions' : [],
|
||||
'result' : {'type' : 'action' ,'action':_get_table_data,'state':'end'}
|
||||
}
|
||||
}
|
||||
|
||||
wizard_load_configured_table('olap.load.configuration.table')
|
||||
@@ -1,401 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import psycopg2
|
||||
import time
|
||||
|
||||
import wizard
|
||||
import pooler
|
||||
import netsvc
|
||||
|
||||
info = '''<?xml version="1.0"?>
|
||||
<form string="Load Data">
|
||||
<label string="Your database structure has been correctly loaded"/>
|
||||
</form>'''
|
||||
|
||||
form1 = '''<?xml version="1.0"?>
|
||||
|
||||
<form string="Load Database Structure">
|
||||
|
||||
<label align="0.0" string="We will load the complete structure of the database by introspection,
|
||||
so that you will be able to work on it, and specify a better structure
|
||||
according to your reporting needs." colspan="4" />
|
||||
<newline/>
|
||||
<label align="0.0" string="After having loaded the structure, you will be able to hide/show or
|
||||
rename tables and columns to simplify end-users interface. The following database
|
||||
will be loaded:" colspan="4"/>
|
||||
<field align="0.0" name='fact_table'/>
|
||||
<newline/>
|
||||
<field align="0.0" name='db_name' colspan="4"/>
|
||||
</form>'''
|
||||
|
||||
field1 = {
|
||||
'fact_table': {'string':'Fact Name', 'type':'char','size':'64', 'required':True, 'readonly':True},
|
||||
'db_name': {'string':'Database Name', 'type':'char','size':'64', 'required':True, 'readonly':True},
|
||||
}
|
||||
|
||||
def olap_db_connect(self,cr,uid,part,context={}):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
lines=pool.get('olap.schema').browse(cr, uid, part['id'],context)
|
||||
id_db=lines.database_id.id
|
||||
type = lines.database_id.type
|
||||
db_name = lines.database_id.db_name
|
||||
tobj = pool.get('olap.database.tables')
|
||||
tcol = pool.get('olap.database.columns')
|
||||
if type == 'postgres':
|
||||
host = lines.database_id.db_host and "host=%s" % lines.database_id.db_host or ''
|
||||
port = lines.database_id.db_port and "port=%s" % lines.database_id.db_port or ''
|
||||
name = lines.database_id.db_name and "dbname=%s" % lines.database_id.db_name or ''
|
||||
user = lines.database_id.db_login and "user=%s" % lines.database_id.db_login or ''
|
||||
password = lines.database_id.db_password and "password=%s" % lines.database_id.db_password or ''
|
||||
tdb = psycopg2.connect('%s %s %s %s %s' % (host, port, name, user, password))
|
||||
cr_db = tdb.cursor()
|
||||
cr.execute('select table_db_name,id from olap_database_tables where fact_database_id=%d', (id_db,))
|
||||
tables = dict(cr.fetchall())
|
||||
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) +')')
|
||||
else:
|
||||
cr.execute('select column_db_name,id,table_id from olap_database_columns')
|
||||
|
||||
for data in cr.fetchall():
|
||||
cols[str(data[1])]=(data[0],int(data[2]))
|
||||
|
||||
print 'Creating / Updating Tables...'
|
||||
cr_db.execute("select table_name, table_catalog from INFORMATION_SCHEMA.tables as a where a.table_schema = 'public'")
|
||||
for table in cr_db.fetchall():
|
||||
val = {
|
||||
'fact_database_id':id_db,
|
||||
'table_db_name':table[0]
|
||||
}
|
||||
|
||||
if table[0] in tables.keys():
|
||||
table_id=tobj.write(cr,uid,[tables[table[0]]], val, context)
|
||||
else:
|
||||
val['name']=table[0]
|
||||
tables[val['name']] = tobj.create(cr,uid,val, context)
|
||||
print 'Creating / Updating Columns...'
|
||||
cr_db.execute("""SELECT
|
||||
table_name, column_name, udt_name
|
||||
from
|
||||
INFORMATION_SCHEMA.columns
|
||||
WHERE table_schema = 'public'""")
|
||||
|
||||
for col in cr_db.fetchall():
|
||||
val = {
|
||||
'table_id': tables[col[0]],
|
||||
'column_db_name': col[1],
|
||||
'type': col[2],
|
||||
}
|
||||
|
||||
id_made=filter(lambda x:(int(cols[x][1])==int(tables[col[0]])),cols)
|
||||
if col[1] in cols.keys() and col[0] in tables.keys()and id_made:
|
||||
col_id=tcol.write(cr,uid,cols[tables[str(col[0])]], val, context)
|
||||
else:
|
||||
val['name']=col[1]
|
||||
id_made = tcol.create(cr,uid,val, context)
|
||||
cols[str(id_made)] = (val['name'],int(val['table_id']))
|
||||
print 'Creating / Updating Constraints...'
|
||||
cr_db.execute("""select
|
||||
table_name,column_name
|
||||
from
|
||||
INFORMATION_schema.key_column_usage
|
||||
where
|
||||
constraint_name IN (
|
||||
select constraint_name from INFORMATION_SCHEMA .table_constraints
|
||||
where
|
||||
constraint_type = 'PRIMARY KEY')""")
|
||||
print "Updating the Primary Key Constraint"
|
||||
for constraint in cr_db.fetchall():
|
||||
val = {
|
||||
'primary_key':True
|
||||
}
|
||||
|
||||
id_to_write=filter(lambda x:(int(cols[x][1])==int(tables[constraint[0]])and(constraint[1]==cols[x][0])),cols)
|
||||
col_id=tcol.write(cr,uid,int(id_to_write[0]),val,context)
|
||||
print "Updating the Foreign key constraint"
|
||||
cr_db.execute("""select
|
||||
constraint_name,table_name
|
||||
from
|
||||
INFORMATION_schema.constraint_column_usage
|
||||
where
|
||||
constraint_name IN (
|
||||
select constraint_name from INFORMATION_SCHEMA.table_constraints
|
||||
where
|
||||
constraint_type = 'FOREIGN KEY')""")
|
||||
for_key=dict(cr_db.fetchall())
|
||||
|
||||
cr_db.execute("""select
|
||||
table_name,column_name,constraint_name
|
||||
from
|
||||
INFORMATION_schema.key_column_usage
|
||||
where
|
||||
constraint_name IN (
|
||||
select constraint_name from INFORMATION_SCHEMA.table_constraints
|
||||
where
|
||||
constraint_type = 'FOREIGN KEY')""")
|
||||
|
||||
for constraint in cr_db.fetchall():
|
||||
val = {
|
||||
'related_to':tables[for_key[constraint[2]]]
|
||||
}
|
||||
id_to_write=filter(lambda x:(int(cols[x][1])==int(tables[constraint[0]])and (constraint[1]==cols[x][0])),cols)
|
||||
col_id=tcol.write(cr,uid,int(id_to_write[0]),val,context)
|
||||
|
||||
|
||||
elif type =='mysql':
|
||||
try:
|
||||
import MySQLdb
|
||||
host = lines.database_id.db_host or ''
|
||||
port = lines.database_id.db_port or ''
|
||||
db = lines.database_id.db_name or ''
|
||||
user = lines.database_id.db_login or ''
|
||||
passwd = lines.database_id.db_password or ''
|
||||
tdb = MySQLdb.connect(host = host,port = port, db = db, user = user, passwd = passwd)
|
||||
|
||||
except Exception, e:
|
||||
raise osv.except_osv('MySQLdb Packages Not Installed.',e )
|
||||
|
||||
cr_db = tdb.cursor()
|
||||
cr.execute('select table_db_name,id from olap_database_tables where fact_database_id=%d', (id_db,))
|
||||
tables = dict(cr.fetchall())
|
||||
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) +')')
|
||||
else:
|
||||
cr.execute('select column_db_name,id,table_id from olap_database_columns')
|
||||
|
||||
for data in cr.fetchall():
|
||||
cols[str(data[1])]=(data[0],int(data[2]))
|
||||
cr_db.execute("select table_name, table_catalog from INFORMATION_SCHEMA.tables where table_schema =%s",(db_name))
|
||||
|
||||
for table in cr_db.fetchall():
|
||||
val = {
|
||||
'fact_database_id':id_db,
|
||||
'table_db_name':table[0]
|
||||
}
|
||||
|
||||
if table[0] in tables.keys():
|
||||
table_id=tobj.write(cr,uid,[tables[table[0]]], val, context)
|
||||
|
||||
else:
|
||||
val['name']=table[0]
|
||||
tables[val['name']] = tobj.create(cr,uid,val, context)
|
||||
cr_db.execute("""SELECT
|
||||
table_name, column_name, data_type
|
||||
from
|
||||
INFORMATION_SCHEMA.columns
|
||||
WHERE table_schema = %s""",(db_name))
|
||||
|
||||
for col in cr_db.fetchall():
|
||||
|
||||
val = {
|
||||
'table_id': tables[col[0]],
|
||||
'column_db_name': col[1],
|
||||
'type': col[2],
|
||||
}
|
||||
|
||||
id_made=filter(lambda x:(int(cols[x][1])==int(tables[col[0]])),cols)
|
||||
if col[1] in cols.keys() and col[0] in tables.keys()and id_made:
|
||||
col_id=tcol.write(cr,uid,cols[tables[str(col[0])]], val, context)
|
||||
else:
|
||||
val['name']=col[1]
|
||||
id_made = tcol.create(cr,uid,val, context)
|
||||
cols[str(id_made)] = (val['name'],int(val['table_id']))
|
||||
|
||||
cr_db.execute("""select
|
||||
REFERENCED_COLUMN_NAME,REFERENCED_TABLE_NAME,COLUMN_NAME,TABLE_NAME
|
||||
from
|
||||
INFORMATION_schema.key_column_usage
|
||||
where table_schema= %s and
|
||||
constraint_name IN (
|
||||
select constraint_name from INFORMATION_SCHEMA .table_constraints
|
||||
where
|
||||
constraint_type IN ('PRIMARY KEY','FOREIGN KEY'))
|
||||
""",(db_name))
|
||||
|
||||
for constraint in cr_db.fetchall():
|
||||
|
||||
if constraint[0]:
|
||||
val = {
|
||||
'related_to':tables[constraint[1]]
|
||||
}
|
||||
else:
|
||||
|
||||
val = {
|
||||
'primary_key':True
|
||||
}
|
||||
id_to_write=filter(lambda x:(int(cols[x][1])==int(tables[constraint[3]])and(constraint[2]==cols[x][0])),cols)
|
||||
col_id=tcol.write(cr,uid,int(id_to_write[0]),val,context)
|
||||
|
||||
elif type == 'oracle':
|
||||
try:
|
||||
import cx_Oracle
|
||||
host = lines.database_id.db_host or ''
|
||||
port = lines.database_id.db_port or ''
|
||||
db = lines.database_id.db_name or ''
|
||||
user = lines.database_id.db_login.upper() or ''
|
||||
passwd = lines.database_id.db_password or ''
|
||||
tdb = cx_Oracle.connect(user, passwrd, host)
|
||||
|
||||
except Exception, e:
|
||||
raise osv.except_osv('cx_Oracle Packages Not Installed.',e )
|
||||
|
||||
cr_db = tdb.cursor()
|
||||
cr.execute('select table_db_name,id from olap_database_tables where fact_database_id=%d', (id_db,))
|
||||
tables = dict(cr.fetchall())
|
||||
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) +')')
|
||||
else:
|
||||
cr.execute('select column_db_name,id,table_id from olap_database_columns')
|
||||
|
||||
for data in cr.fetchall():
|
||||
cols[str(data[1])]=(data[0],int(data[2]))
|
||||
|
||||
cr_db.execute("select table_name from all_tables where owner =%s",(user))
|
||||
temp = cr_db.fetchall()
|
||||
for table in temp:
|
||||
val = {
|
||||
'fact_database_id':id_db,
|
||||
'table_db_name':table[0]
|
||||
}
|
||||
|
||||
if table[0] in tables.keys():
|
||||
table_id=tobj.write(cr,uid,[tables[table[0]]], val, context)
|
||||
|
||||
else:
|
||||
val['name']=table[0]
|
||||
tables[val['name']] = tobj.create(cr,uid,val, context)
|
||||
|
||||
cr_db.execute("""SELECT
|
||||
table_name, column_name, data_type
|
||||
from
|
||||
all_tab_columns
|
||||
WHERE owner = %s""",(user))
|
||||
temp = cr_db.fetchall()
|
||||
for col in temp:
|
||||
if col[2]=='NUMBER':
|
||||
type_col='numeric'
|
||||
elif col[2]=='DATE':
|
||||
type_col='date'
|
||||
elif col[2]=='VARCHAR2':
|
||||
type_col='varchar'
|
||||
else:
|
||||
type_col=col[2]
|
||||
val = {
|
||||
'table_id': tables[col[0]],
|
||||
'column_db_name': col[1],
|
||||
'type': type_col,
|
||||
}
|
||||
|
||||
id_made=filter(lambda x:(int(cols[x][1])==int(tables[col[0]])),cols)
|
||||
if col[1] in cols.keys() and col[0] in tables.keys()and id_made:
|
||||
col_id=tcol.write(cr,uid,cols[tables[str(col[0])]], val, context)
|
||||
else:
|
||||
val['name']=col[1]
|
||||
id_made = tcol.create(cr,uid,val, context)
|
||||
cols[str(id_made)] = (val['name'],int(val['table_id']))
|
||||
|
||||
cr_db.execute("""select
|
||||
table_name,column_name,constraint_name
|
||||
from
|
||||
all_cons_columns
|
||||
where
|
||||
constraint_name IN (
|
||||
select constraint_name from all_constraints
|
||||
where
|
||||
constraint_type = 'P' and owner= %s)
|
||||
""",(user))
|
||||
temp = cr_db.fetchall()
|
||||
pk_table = {}
|
||||
for constraint in temp:
|
||||
val = {
|
||||
'primary_key' : True
|
||||
}
|
||||
pk_table[constraint[2]] = constraint[0]
|
||||
|
||||
id_to_write=filter(lambda x : (int(cols[x][1])==int(tables[constraint[0]])and(constraint[1]==cols[x][0])),cols)
|
||||
col_id=tcol.write(cr,uid,int(id_to_write[0]),val,context)
|
||||
|
||||
cr_db.execute("""select
|
||||
constraint_name,r_constraint_name from all_constraints
|
||||
where
|
||||
constraint_type = 'R' and owner = %s
|
||||
""",(user))
|
||||
constraints_map={}
|
||||
for data in cr_db.fetchall():
|
||||
constraints_map[data[0]]=data[1]
|
||||
|
||||
cr_db.execute("""select
|
||||
table_name,column_name,constraint_name
|
||||
from
|
||||
all_cons_columns
|
||||
where
|
||||
constraint_name IN (
|
||||
select constraint_name from all_constraints
|
||||
where
|
||||
constraint_type = 'R' and owner = %s)
|
||||
""",(user))
|
||||
|
||||
|
||||
temp = cr_db.fetchall()
|
||||
for constraint in temp:
|
||||
rel_constraint_name=constraints_map[constraint[2]]
|
||||
req_table = pk_table[rel_constraint_name]
|
||||
val = {
|
||||
'related_to' : tables[req_table]
|
||||
}
|
||||
id_to_write=filter(lambda x:(int(cols[x][1])==int(tables[constraint[0]])and (constraint[1]==cols[x][0])),cols)
|
||||
col_id=tcol.write(cr,uid,int(id_to_write[0]),val,context)
|
||||
|
||||
pooler.get_pool(cr.dbname).get('olap.fact.database').write(cr,uid,[id_db],{'loaded':True})
|
||||
wf_service = netsvc.LocalService('workflow')
|
||||
wf_service.trg_validate(uid, 'olap.schema', part['id'], 'dbload', cr)
|
||||
return {}
|
||||
|
||||
def _getdata(self,cr,uid,part,context={}):
|
||||
lines=pooler.get_pool(cr.dbname).get('olap.schema').browse(cr, uid, part['id'],context)
|
||||
part['form']['fact_table']=lines.database_id.name
|
||||
part['form']['db_name']=lines.database_id.db_name
|
||||
return part['form']
|
||||
|
||||
class wizard_data_loader(wizard.interface):
|
||||
states = {
|
||||
'init': {
|
||||
'actions': [_getdata],
|
||||
'result': {'type':'form','arch':form1, 'fields':field1, 'state':[('end','Cancel'),('ok','Load Database Structure')]}
|
||||
},
|
||||
'ok': {
|
||||
'actions': [olap_db_connect],
|
||||
'result': {'type':'form','arch':info,'fields':{}, 'state':[('end','Continue and Configure Structure')]}
|
||||
},
|
||||
'info': {
|
||||
'actions': [],
|
||||
'result': {'type':'form', 'arch':info, 'fields':{}, 'state':[('end','Ok')]}
|
||||
},
|
||||
}
|
||||
wizard_data_loader('olap.load.table')
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,231 +0,0 @@
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
|
||||
#
|
||||
# WARNING: This program as such is intended to be used by professional
|
||||
# programmers who take the whole responsability of assessing all potential
|
||||
# consequences resulting from its eventual inadequacies and bugs
|
||||
# End users who are looking for a ready-to-use solution with commercial
|
||||
# garantees and support are strongly adviced to contract a Free Software
|
||||
# Service Company
|
||||
#
|
||||
# This program is Free Software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import wizard
|
||||
import threading
|
||||
import pooler
|
||||
from osv import osv
|
||||
import optparse
|
||||
import xmlrpclib
|
||||
import time
|
||||
|
||||
import netsvc
|
||||
|
||||
|
||||
|
||||
class Log:
|
||||
def __init__(self):
|
||||
self.content= ""
|
||||
self.error= False
|
||||
def add(self,s,error=True):
|
||||
self.content= self.content + s
|
||||
if error:
|
||||
self.error= error
|
||||
def __call__(self):
|
||||
return self.content
|
||||
|
||||
|
||||
def get_cube(self, cr, uid, context):
|
||||
pool = pooler.get_pool(cr.dbname).get('olap.cube')
|
||||
ids = pool.search(cr, uid, [])
|
||||
res = pool.read(cr, uid, ids, ['schema_id','name'], context)
|
||||
res=[(r['schema_id'], r['name']) for r in res]
|
||||
|
||||
return res
|
||||
|
||||
def get_details(self, cr, uid,data, context):
|
||||
"""
|
||||
To Fetch dimension of selected schema
|
||||
"""
|
||||
pool = pooler.get_pool(cr.dbname).get('olap.cube')
|
||||
|
||||
search_id=data['form']['cube_schema'][0]
|
||||
|
||||
ids=pool.search(cr,uid,[('schema_id','=',search_id)])
|
||||
|
||||
"""
|
||||
ids now have the cube id from schema user selected
|
||||
"""
|
||||
|
||||
"""
|
||||
To Fetch hiearchy of selected schema
|
||||
"""
|
||||
pool = pooler.get_pool(cr.dbname).get('olap.dimension')
|
||||
|
||||
id_dimension=pool.search(cr,uid,[('cube_id','=',ids[0])])
|
||||
res=pool.read(cr,uid,id_dimension,['id','name'],context)
|
||||
log_d=Log()
|
||||
for r in res:
|
||||
log_d.add(r['name'])
|
||||
log_d.add("\n")
|
||||
|
||||
|
||||
"""
|
||||
To Fetch hiearchy id
|
||||
"""
|
||||
pool=pooler.get_pool(cr.dbname).get('olap.hierarchy')
|
||||
|
||||
id_hierarchy=pool.search(cr,uid,[('dimension_id','in',tuple(id_dimension))])
|
||||
res=pool.read(cr,uid,id_hierarchy,['id','name'],context)
|
||||
log_h=Log()
|
||||
for r in res:
|
||||
log_h.add(r['name'])
|
||||
log_h.add("\n")
|
||||
|
||||
|
||||
|
||||
"""
|
||||
To fetch level id
|
||||
"""
|
||||
pool=pooler.get_pool(cr.dbname).get('olap.level')
|
||||
id_level=pool.search(cr,uid,[('hierarchy_id','in',tuple(id_hierarchy))])
|
||||
res=pool.read(cr,uid,id_level,['id','name'],context)
|
||||
log_l=Log()
|
||||
for r in res:
|
||||
log_l.add(r['name'])
|
||||
log_l.add("\n")
|
||||
|
||||
"""
|
||||
To fetch measures id
|
||||
"""
|
||||
pool=pooler.get_pool(cr.dbname).get('olap.measure')
|
||||
id_level=pool.search(cr,uid,[('cube_id','in',tuple(ids))])
|
||||
res=pool.read(cr,uid,id_level,['id','name'],context)
|
||||
log_m=Log()
|
||||
for r in res:
|
||||
log_m.add(r['name'])
|
||||
log_m.add("\n")
|
||||
|
||||
|
||||
return {'hierarchy':log_h(),'dimension':log_d(),'level':log_l(),'measure':log_m()}
|
||||
|
||||
|
||||
|
||||
|
||||
query_builder_form = """<?xml version="1.0"?>
|
||||
<form string="Query Builder">
|
||||
<field name="dimension"/>
|
||||
<field name="hierarchy"/>
|
||||
<field name="level"/>
|
||||
<field name="measure"/>
|
||||
<field name="mdx_query" colspan="4" height="100" width="800"/>
|
||||
<field name="mdx_query_output" colspan="4" height="100" width="800"/>
|
||||
</form>"""
|
||||
query_builder_fields={
|
||||
'dimension':{'string':'Dimension','type':'text'},
|
||||
'hierarchy':{'string':'Hiearchy','type':'text'},
|
||||
'level':{'string':'Level','type':'text'},
|
||||
'measure':{'string':'Measure','type':'text'},
|
||||
'mdx_query':{'string':'MDX Query','type':'text'},
|
||||
'mdx_query_output':{'string':'MDX Query Output','type':'text'},
|
||||
}
|
||||
|
||||
query_builder_fetch_form = """<?xml version="1.0"?>
|
||||
<form string="Cube Fetcher">
|
||||
<field name="cube_schema"/>
|
||||
</form>"""
|
||||
|
||||
query_builder_fetch_fields = {
|
||||
'cube_schema':{'string':'Select Cube','type':'selection','selection':get_cube},
|
||||
}
|
||||
|
||||
|
||||
|
||||
def _execute_mdx(self, cr, uid, data, context):
|
||||
|
||||
log=Log()
|
||||
|
||||
pool = pooler.get_pool(cr.dbname).get('olap.schema')
|
||||
ids = pool.search(cr, uid, [('database_id','=',data['form']['cube_schema'][0])])
|
||||
res1 = pool.read(cr, uid, ids,['name'], context)
|
||||
|
||||
"""
|
||||
doing same using request method of olap.schema
|
||||
creating the object of olpa.schema and using its request method for parsing the query
|
||||
"""
|
||||
r=data['form']['mdx_query']
|
||||
n=res1[0]['name']
|
||||
service=netsvc.LocalService("object_proxy")
|
||||
axis,data1=service.execute(cr.dbname,uid,'olap.schema','request',n,r,context={})
|
||||
output=''
|
||||
|
||||
COLSPAN = 18
|
||||
ROWSPAN = 18
|
||||
if len(axis)>1:
|
||||
for i in range(8):
|
||||
ok = False
|
||||
for x in axis[1]:
|
||||
if len(x[0])==i:
|
||||
ok = True
|
||||
if not ok:
|
||||
continue
|
||||
output =' '*COLSPAN
|
||||
log.add(output)
|
||||
output=(('%-'+str(ROWSPAN)+'s ' ) * len(axis[1])) % tuple(map(lambda x: str(len(x[0])==i and x[1] or ''),axis[1]))
|
||||
log.add(output)
|
||||
|
||||
for col in data1:
|
||||
x=(' '*(len(axis[0][0][0])-1)*2)
|
||||
print "--------------------------------------",x
|
||||
temp=(axis[0].pop(0)[1])
|
||||
print "--------------------------------------",temp
|
||||
output =('%-'+str(COLSPAN)+'s')% (str(x)+str(temp))
|
||||
log.add("\n")
|
||||
log.add(output)
|
||||
|
||||
for row in col:
|
||||
if row==[False]:
|
||||
output=('%-'+str(ROWSPAN)+'s')%('')
|
||||
log.add(output)
|
||||
|
||||
else:
|
||||
output=('%-'+str(ROWSPAN)+'s')%(row)
|
||||
log.add(output)
|
||||
log.add("\n")
|
||||
return {'mdx_query_output':log()}
|
||||
|
||||
class wizard_query_builder(wizard.interface):
|
||||
states = {
|
||||
'init' : {
|
||||
'actions' : [],
|
||||
'result' : {'type':'form', 'arch':query_builder_fetch_form, 'fields':query_builder_fetch_fields, 'state':[('ok', 'Fetch Data')]}
|
||||
},
|
||||
'ok':{
|
||||
'actions' : [get_details],
|
||||
'result' : {'type':'form', 'arch':query_builder_form, 'fields':query_builder_fields, 'state':[('back','Change cube'),('exec', 'Execute'),('end', 'Cancel')]}
|
||||
},
|
||||
|
||||
'exec': {
|
||||
'actions': [_execute_mdx],
|
||||
'result': {'type':'form','arch':query_builder_form,'fields':query_builder_fields,'state':[('back','Change cube'),('exec', 'Execute'),('end', 'Cancel')]},
|
||||
},
|
||||
'back':{
|
||||
'actions':[],
|
||||
'result':{'type':'form','arch':query_builder_fetch_form,'fields':query_builder_fetch_fields,'state':[('ok', 'Fetch Data')]},
|
||||
},
|
||||
}
|
||||
wizard_query_builder('olap.query_builder')
|
||||
@@ -1,52 +0,0 @@
|
||||
import psycopg2
|
||||
|
||||
import wizard
|
||||
import pooler
|
||||
import netsvc
|
||||
from tools.misc import UpdateableStr, UpdateableDict
|
||||
|
||||
|
||||
_connection_arch = UpdateableStr()
|
||||
|
||||
def _test_connection(self,cr,uid,part,context={}):
|
||||
lines=pooler.get_pool(cr.dbname).get('olap.fact.database').browse(cr, uid, part['id'],context)
|
||||
host = lines.db_host
|
||||
port = lines.db_port
|
||||
db_name = lines.db_name
|
||||
user = lines.db_login
|
||||
password = lines.db_password
|
||||
type = lines.type
|
||||
return_str = "Connection Successful"
|
||||
try:
|
||||
if type == 'postgres':
|
||||
tdb = psycopg2.connect('host=%s port=%s dbname=%s user=%s password=%s' % (host, port, db_name, user, password))
|
||||
|
||||
elif type == 'mysql':
|
||||
import MySQLdb
|
||||
tdb = MySQLdb.connect(host = host,port = port, db = db_name, user = user, passwd = password)
|
||||
|
||||
|
||||
elif type == 'oracle':
|
||||
import cx_Oracle
|
||||
tdb = cx_Oracle.connect(user, password, host)
|
||||
|
||||
except Exception, e:
|
||||
return_str = e.message
|
||||
|
||||
_arch = ['''<?xml version="1.0"?>''', '''<form string="Connection Status">''']
|
||||
_arch.append('''<label string='%s' />''' % (return_str))
|
||||
_arch.append('''</form>''')
|
||||
_connection_arch.string = '\n'.join(_arch)
|
||||
|
||||
return {}
|
||||
|
||||
|
||||
|
||||
class wizard_test_connection(wizard.interface):
|
||||
states = {
|
||||
'init': {
|
||||
'actions': [_test_connection],
|
||||
'result': {'type':'form', 'arch': _connection_arch, 'fields':{}, 'state':[('end','Ok')]}
|
||||
},
|
||||
}
|
||||
wizard_test_connection('olap.fact.database.test_connection')
|
||||
@@ -1,22 +0,0 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import olap_crm
|
||||
@@ -1,37 +0,0 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
{
|
||||
"name" : "olap_crm",
|
||||
"version" : "0.1",
|
||||
"author" : "OpenERP SA",
|
||||
"website" : "http://www.openerp.com",
|
||||
"depends" : ["olap"],
|
||||
"category" : "Generic Modules/Olap",
|
||||
"description": """
|
||||
CRM module will load the data in olap tables
|
||||
""",
|
||||
"init_xml" : ['olap_data.xml'],
|
||||
"update_xml" :[],
|
||||
"demo_xml" : ['olap_crm.xml'],
|
||||
"active": False,
|
||||
"installable": True
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
# German translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-05-01 20:41+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: German <de@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,description:olap_crm.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Sale module will load the data in olap tables\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
|
||||
msgid "olap_crm"
|
||||
msgstr ""
|
||||
@@ -1,34 +0,0 @@
|
||||
# Spanish translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-04-11 21:50+0000\n"
|
||||
"Last-Translator: Juan Eduardo Riva <juaneduardoriva@gmail.com>\n"
|
||||
"Language-Team: Spanish <es@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,description:olap_crm.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Sale module will load the data in olap tables\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Módulo ventas cargara los datos en una tabla olap\n"
|
||||
" "
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
|
||||
msgid "olap_crm"
|
||||
msgstr "olap_crm"
|
||||
@@ -1,34 +0,0 @@
|
||||
# Spanish translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-09-19 00:07+0000\n"
|
||||
"Last-Translator: Juan Eduardo Riva <juaneduardoriva@gmail.com>\n"
|
||||
"Language-Team: Spanish <es@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,description:olap_crm.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Sale module will load the data in olap tables\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Módulo ventas cargara los datos en una tabla olap\n"
|
||||
" "
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
|
||||
msgid "olap_crm"
|
||||
msgstr "olap_crm"
|
||||
@@ -1,34 +0,0 @@
|
||||
# French translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-05-21 14:53+0000\n"
|
||||
"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ <Unknown>\n"
|
||||
"Language-Team: French <fr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,description:olap_crm.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Sale module will load the data in olap tables\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Module de vente qui chargera les données dans les tables olap\n"
|
||||
" "
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
|
||||
msgid "olap_crm"
|
||||
msgstr "olap_crm"
|
||||
@@ -1,29 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * olap_crm
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29:03+0000\n"
|
||||
"PO-Revision-Date: 2009-11-26 05:29:03+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,description:olap_crm.module_meta_information
|
||||
msgid "\n"
|
||||
" Sale module will load the data in olap tables\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
|
||||
msgid "olap_crm"
|
||||
msgstr ""
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
# Croatian translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-03-02 23:39+0000\n"
|
||||
"Last-Translator: goranc <goranc@gmail.com>\n"
|
||||
"Language-Team: Croatian <hr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,description:olap_crm.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Sale module will load the data in olap tables\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Modul prodaja uvesti će podatke u olap tablice\n"
|
||||
" "
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
|
||||
msgid "olap_crm"
|
||||
msgstr "olap_crm"
|
||||
@@ -1,31 +0,0 @@
|
||||
# Indonesian translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-05-28 10:44+0000\n"
|
||||
"Last-Translator: Abdul Munif Hanafi <Unknown>\n"
|
||||
"Language-Team: Indonesian <id@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,description:olap_crm.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Sale module will load the data in olap tables\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
|
||||
msgid "olap_crm"
|
||||
msgstr "olap_crm"
|
||||
@@ -1,34 +0,0 @@
|
||||
# Italian translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-09-29 10:46+0000\n"
|
||||
"Last-Translator: Andrea Amoroso <andrea.amoroso@alice.it>\n"
|
||||
"Language-Team: Italian <it@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-30 04:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,description:olap_crm.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Sale module will load the data in olap tables\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Il modulo di vendita caricherà i dati in tabelle OLAP\n"
|
||||
" "
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
|
||||
msgid "olap_crm"
|
||||
msgstr "olap_crm"
|
||||
@@ -1,42 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * olap_crm
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-08-11 05:38+0000\n"
|
||||
"Last-Translator: ub121 <ubs121@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,description:olap_crm.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Sale module will load the data in olap tables\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Sale модуль өгөгдлийг olap хүснэгтэд ачаалах болно\n"
|
||||
" "
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
|
||||
msgid "olap_crm"
|
||||
msgstr "Олап_срм"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "\n"
|
||||
#~ " CRM module will load the data in olap tables\n"
|
||||
#~ " "
|
||||
#~ msgstr ""
|
||||
#~ "\n"
|
||||
#~ " СРМ модуль олап хүснэгтэнд өгөдөлийг ачааллана\n"
|
||||
#~ " "
|
||||
@@ -1,31 +0,0 @@
|
||||
# Occitan (post 1500) translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-03-12 13:38+0000\n"
|
||||
"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
|
||||
"Language-Team: Occitan (post 1500) <oc@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,description:olap_crm.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Sale module will load the data in olap tables\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
|
||||
msgid "olap_crm"
|
||||
msgstr "olap_crm"
|
||||
@@ -1,29 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * olap_crm
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29:03+0000\n"
|
||||
"PO-Revision-Date: 2009-11-26 05:29:03+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,description:olap_crm.module_meta_information
|
||||
msgid "\n"
|
||||
" Sale module will load the data in olap tables\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
|
||||
msgid "olap_crm"
|
||||
msgstr ""
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
# Polish translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-04-14 10:45+0000\n"
|
||||
"Last-Translator: Krystian Twardowski <Unknown>\n"
|
||||
"Language-Team: Polish <pl@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,description:olap_crm.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Sale module will load the data in olap tables\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
|
||||
msgid "olap_crm"
|
||||
msgstr "olap_crm"
|
||||
@@ -1,34 +0,0 @@
|
||||
# Brazilian Portuguese translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-03-24 01:24+0000\n"
|
||||
"Last-Translator: Pedro_Maschio <pedro.bicudo@tgtconsult.com.br>\n"
|
||||
"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,description:olap_crm.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Sale module will load the data in olap tables\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Módulo de vendas vai carregar os dados nas tabelas OLAP\n"
|
||||
" "
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
|
||||
msgid "olap_crm"
|
||||
msgstr "olap_crm"
|
||||
@@ -1,34 +0,0 @@
|
||||
# Slovak translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-02-23 08:14+0000\n"
|
||||
"Last-Translator: Radoslav Sloboda <rado.sloboda@gmail.com>\n"
|
||||
"Language-Team: Slovak <sk@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,description:olap_crm.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Sale module will load the data in olap tables\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Modul predaja načíta dáta v OLAP tabuľkách\n"
|
||||
" "
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
|
||||
msgid "olap_crm"
|
||||
msgstr "olap_crm"
|
||||
@@ -1,34 +0,0 @@
|
||||
# Slovenian translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-01-27 14:20+0000\n"
|
||||
"Last-Translator: Simon Vidmar <Unknown>\n"
|
||||
"Language-Team: Slovenian <sl@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,description:olap_crm.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Sale module will load the data in olap tables\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Modul Prodaja bo naložil podatke v tabele OLAP\n"
|
||||
" "
|
||||
|
||||
#. module: olap_crm
|
||||
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
|
||||
msgid "olap_crm"
|
||||
msgstr "olap_crm"
|
||||
@@ -1,462 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!--
|
||||
CUSTOM CUBE FOR CRM
|
||||
-->
|
||||
|
||||
<record model="olap.fact.database" id="fact_databases_BI">
|
||||
<field name="name">OpenERP CRM Database</field>
|
||||
<field name="db_name">crm</field>
|
||||
<field name="db_login">postgres</field>
|
||||
<field name="db_password">postgres</field>
|
||||
</record>
|
||||
<!--
|
||||
Schema
|
||||
-->
|
||||
<record model="olap.schema" id="schema_crm">
|
||||
<field name="name">OpenERPCRM</field>
|
||||
<field name="state">none</field>
|
||||
<field name="database_id" ref="fact_databases_BI"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Adding the database tables and database columns to be used and making up the of the
|
||||
cube table and cube table line
|
||||
-->
|
||||
|
||||
|
||||
<!-- Olap Database Tables -->
|
||||
<record model="olap.database.tables" id="table_crm_case">
|
||||
<field name="name">crm_case</field>
|
||||
<field name="table_db_name">crm_case</field>
|
||||
<field name="fact_database_id" ref="fact_databases_BI"/>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
<record model="olap.database.tables" id="table_crm_case_categ">
|
||||
<field name="name">crm_case_categ</field>
|
||||
<field name="table_db_name">crm_case_categ</field>
|
||||
<field name="fact_database_id" ref="fact_databases_BI"/>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
<record model="olap.database.tables" id="table_crm_case_stage">
|
||||
<field name="name">crm_case_stage</field>
|
||||
<field name="table_db_name">crm_case_stage</field>
|
||||
<field name="fact_database_id" ref="fact_databases_BI"/>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
<record model="olap.database.tables" id="table_res_partner">
|
||||
<field name="name">res_partner</field>
|
||||
<field name="table_db_name">res_partner</field>
|
||||
<field name="fact_database_id" ref="fact_databases_BI"/>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
<record model="olap.database.tables" id="table_crm_case_section">
|
||||
<field name="name">crm_case_section</field>
|
||||
<field name="table_db_name">crm_case_section</field>
|
||||
<field name="fact_database_id" ref="fact_databases_BI"/>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
<record model="olap.database.tables" id="table_res_partner_canal">
|
||||
<field name="name">res_partner_canal</field>
|
||||
<field name="table_db_name">res_partner_canal</field>
|
||||
<field name="fact_database_id" ref="fact_databases_BI"/>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
<!-- Olap Database Columns -->
|
||||
|
||||
|
||||
<record model="olap.database.columns" id="crm_case_id">
|
||||
<field name="name">id</field>
|
||||
<field name="column_db_name">id</field>
|
||||
<field name="type">int4</field>
|
||||
<field name="table_id" ref="table_crm_case"/>
|
||||
<field name="primary_key">True</field>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
<record model="olap.database.columns" id="crm_case_planned_revenue">
|
||||
<field name="name">planned_revenue</field>
|
||||
<field name="column_db_name">planned_revenue</field>
|
||||
<field name="type">float8</field>
|
||||
<field name="table_id" ref="table_crm_case"/>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
<record model="olap.database.columns" id="crm_case_partner_id">
|
||||
<field name="name">parnter_id</field>
|
||||
<field name="column_db_name">partner_id</field>
|
||||
<field name="type">float8</field>
|
||||
<field name="table_id" ref="table_crm_case"/>
|
||||
<field name="active">True</field>
|
||||
<field name="related_to" ref="table_res_partner"/>
|
||||
</record>
|
||||
|
||||
<record model="olap.database.columns" id="crm_case_planned_cost">
|
||||
<field name="name">id</field>
|
||||
<field name="column_db_name">id</field>
|
||||
<field name="type">float8</field>
|
||||
<field name="table_id" ref="table_crm_case"/>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
<record model="olap.database.columns" id="crm_case_probability">
|
||||
<field name="name">probability</field>
|
||||
<field name="column_db_name">probability</field>
|
||||
<field name="type">float8</field>
|
||||
<field name="table_id" ref="table_crm_case"/>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
<record model="olap.database.columns" id="crm_case_state">
|
||||
<field name="name">state</field>
|
||||
<field name="column_db_name">state</field>
|
||||
<field name="type">varchar</field>
|
||||
<field name="table_id" ref="table_crm_case"/>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
<record model="olap.database.columns" id="res_partner_canal_name">
|
||||
<field name="name">name</field>
|
||||
<field name="column_db_name">name</field>
|
||||
<field name="type">varchar</field>
|
||||
<field name="table_id" ref="table_res_partner_canal"/>
|
||||
<field name="active">True</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<record model="olap.database.columns" id="crm_case_categ_id">
|
||||
<field name="name">categ_id</field>
|
||||
<field name="column_db_name">categ_id</field>
|
||||
<field name="type">int4</field>
|
||||
<field name="table_id" ref="table_crm_case"/>
|
||||
<field name="related_to" ref="table_crm_case_categ"/>
|
||||
</record>
|
||||
|
||||
<record model="olap.database.columns" id="crm_case_partner_id">
|
||||
<field name="name">partner_id</field>
|
||||
<field name="column_db_name">partner_id</field>
|
||||
<field name="type">int4</field>
|
||||
<field name="table_id" ref="table_crm_case"/>
|
||||
<field name="related_to" ref="table_res_partner"/>
|
||||
</record>
|
||||
|
||||
<record model="olap.database.columns" id="crm_case_canal_id">
|
||||
<field name="name">canal_id</field>
|
||||
<field name="column_db_name">canal_id</field>
|
||||
<field name="type">int4</field>
|
||||
<field name="table_id" ref="table_crm_case"/>
|
||||
<field name="related_to" ref="table_res_partner_canal"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="olap.database.columns" id="res_partner_name">
|
||||
<field name="name">name</field>
|
||||
<field name="column_db_name">name</field>
|
||||
<field name="type">varchar</field>
|
||||
<field name="table_id" ref="table_res_partner"/>
|
||||
</record>
|
||||
|
||||
<record model="olap.database.columns" id="crm_case_section_name">
|
||||
<field name="name">name</field>
|
||||
<field name="column_db_name">name</field>
|
||||
<field name="type">varchar</field>
|
||||
<field name="table_id" ref="table_crm_case_section"/>
|
||||
</record>
|
||||
<record model="olap.database.columns" id="crm_case_stage_name">
|
||||
<field name="name">name</field>
|
||||
<field name="column_db_name">name</field>
|
||||
<field name="type">varchar</field>
|
||||
<field name="table_id" ref="table_crm_case_stage"/>
|
||||
</record>
|
||||
|
||||
<record model="olap.database.columns" id="crm_case_stage_id">
|
||||
<field name="name">stage_id</field>
|
||||
<field name="column_db_name">stage_id</field>
|
||||
<field name="type">int4</field>
|
||||
<field name="table_id" ref="table_crm_case"/>
|
||||
<field name="related_to" ref="table_crm_case_stage"/>
|
||||
</record>
|
||||
|
||||
<record model="olap.database.columns" id="crm_case_stage_section_id">
|
||||
<field name="name">section_id</field>
|
||||
<field name="column_db_name">section_id</field>
|
||||
<field name="type">int4</field>
|
||||
<field name="table_id" ref="table_crm_case_stage"/>
|
||||
<field name="related_to" ref="table_crm_case_section"/>
|
||||
</record>
|
||||
|
||||
<record model="olap.database.columns" id="crm_case_categ_name">
|
||||
<field name="name">name</field>
|
||||
<field name="column_db_name">name</field>
|
||||
<field name="type">varchar</field>
|
||||
<field name="table_id" ref="table_crm_case_categ"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<!-- Cube-->
|
||||
|
||||
<!-- Cube Table -->
|
||||
<record model="olap.cube.table" id="crm_cube_table">
|
||||
<field name="name">crm_cube</field>
|
||||
<field name='schema_id' ref='schema_crm'/>
|
||||
<field name='column_link_id' ref='crm_case_id'/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="olap.cube.table" id="crm_cube_section_table">
|
||||
<field name="name">crm_cube_section</field>
|
||||
<field name='schema_id' ref='schema_crm'/>
|
||||
<field name='column_link_id' ref='crm_case_stage_id'/>
|
||||
</record>
|
||||
|
||||
<record model="olap.cube.table" id="crm_cube_stage_table">
|
||||
<field name="name">crm_cube_stage_parnter</field>
|
||||
<field name='schema_id' ref='schema_crm'/>
|
||||
<field name='column_link_id' ref='crm_case_stage_id'/>
|
||||
</record>
|
||||
<record model="olap.cube.table" id="crm_cube_parnter_table">
|
||||
<field name="name">crm_cube_parnter</field>
|
||||
<field name='schema_id' ref='schema_crm'/>
|
||||
<field name='column_link_id' ref='crm_case_partner_id'/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="olap.cube.table" id="crm_cube_categ_table">
|
||||
<field name="name">crm_cube_categ</field>
|
||||
<field name='schema_id' ref='schema_crm'/>
|
||||
<field name='column_link_id' ref='crm_case_categ_id'/>
|
||||
</record>
|
||||
|
||||
<record model="olap.cube.table" id="crm_cube_channel_table">
|
||||
<field name="name">crm_cube_channel</field>
|
||||
<field name='schema_id' ref='schema_crm'/>
|
||||
<field name='column_link_id' ref='crm_case_canal_id'/>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Cube Table Line -->
|
||||
<record model="olap.cube.table.line" id="crm_cube_table_line">
|
||||
<field name="field_id" ref="crm_case_categ_id"/>
|
||||
<field name="table_id" ref="table_crm_case"/>
|
||||
<field name="cube_table_id" ref="crm_cube_table"/>
|
||||
</record>
|
||||
|
||||
<record model="olap.cube.table.line" id="crm_section_table_line">
|
||||
<field name="field_id" ref="crm_case_stage_section_id"/>
|
||||
<field name="table_id" ref="table_crm_case_stage"/>
|
||||
<field name="cube_table_id" ref="crm_cube_section_table"/>
|
||||
</record>
|
||||
<!-- Cube -->
|
||||
|
||||
<record model="olap.cube" id="cube_crm">
|
||||
<field name="name">CRM</field>
|
||||
<field name="table_id" ref="crm_cube_table"/>
|
||||
<field name="schema_id" ref="schema_crm"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
DIMENSION Sections
|
||||
|
||||
-->
|
||||
|
||||
<record model="olap.dimension" id="dimension_crm_section">
|
||||
<field name="name">Sections</field>
|
||||
<field name="cube_id" ref="cube_crm"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="olap.hierarchy" id="hierarchy_crm_section">
|
||||
<field name="name">Sections</field>
|
||||
<field name="dimension_id" ref="dimension_crm_section"/>
|
||||
<field name="table_id" ref="crm_cube_section_table"/>
|
||||
</record>
|
||||
|
||||
<record model="olap.level" id="level_crm_section">
|
||||
<field name="name">Sections</field>
|
||||
<field name="column_name" ref="crm_case_section_name"></field>
|
||||
<field name="column_id_name">name</field>
|
||||
<field name="table_name">crm_case_section</field>
|
||||
<field name="hierarchy_id" ref="hierarchy_crm_section"/>
|
||||
<field name="sequence">1</field>
|
||||
</record>
|
||||
|
||||
<record model="olap.level" id="level_crm_section_seq_2">
|
||||
<field name="name">States</field>
|
||||
<field name="column_name" ref="crm_case_stage_name"></field>
|
||||
<field name="column_id_name">name</field>
|
||||
<field name="table_name">crm_case_stage</field>
|
||||
<field name="hierarchy_id" ref="hierarchy_crm_section"/>
|
||||
<field name="sequence">2</field>
|
||||
</record>
|
||||
|
||||
<!-- Dimension State-->
|
||||
|
||||
<record model="olap.dimension" id="dimension_crm_state">
|
||||
<field name="name">States</field>
|
||||
<field name="cube_id" ref="cube_crm"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="olap.hierarchy" id="hierarchy_crm_state">
|
||||
<field name="name">States</field>
|
||||
<field name="dimension_id" ref="dimension_crm_state"/>
|
||||
<field name="table_id" ref="crm_cube_table"/>
|
||||
</record>
|
||||
|
||||
<record model="olap.level" id="level_crm_section">
|
||||
<field name="name">States</field>
|
||||
<field name="column_name" ref="crm_case_state"></field>
|
||||
<field name="column_id_name">state</field>
|
||||
<field name="table_name">crm_case</field>
|
||||
<field name="hierarchy_id" ref="hierarchy_crm_state"/>
|
||||
<field name="sequence">1</field>
|
||||
</record>
|
||||
|
||||
<record model="olap.level" id="level_crm_section_seq_2">
|
||||
<field name="name">States</field>
|
||||
<field name="column_name" ref="crm_case_stage_name"></field>
|
||||
<field name="column_id_name">name</field>
|
||||
<field name="table_name">crm_case_stage</field>
|
||||
<field name="hierarchy_id" ref="hierarchy_crm_section"/>
|
||||
<field name="sequence">2</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
Category
|
||||
-->
|
||||
<record model="olap.dimension" id="dimension_crm_category">
|
||||
<field name="name">Category</field>
|
||||
<field name="cube_id" ref="cube_crm"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="olap.hierarchy" id="hierarchy_crm_category">
|
||||
<field name="name">Category</field>
|
||||
<field name="dimension_id" ref="dimension_crm_category"/>
|
||||
<field name="primary_key_table">crm_case</field>
|
||||
<field name="table_id" ref="crm_cube_categ_table"/>
|
||||
</record>
|
||||
|
||||
<record model="olap.level" id="level_crm_categorys">
|
||||
<field name="name">name</field>
|
||||
<field name="column_name" ref="crm_case_categ_name"></field>
|
||||
<field name="column_id_name">name</field>
|
||||
<field name="table_name">crm_case_categ</field>
|
||||
<field name="hierarchy_id" ref="hierarchy_crm_category"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Customer
|
||||
-->
|
||||
<record model="olap.dimension" id="dimension_crm_customer">
|
||||
<field name="name">Customer</field>
|
||||
<field name="cube_id" ref="cube_crm"/>
|
||||
</record>
|
||||
|
||||
<record model="olap.hierarchy" id="hierarchy_crm_customer">
|
||||
<field name="name">Customer</field>
|
||||
<field name="dimension_id" ref="dimension_crm_customer"/>
|
||||
<field name="primary_key_table">crm_case</field>
|
||||
<field name="table_id" ref="crm_cube_parnter_table"/>
|
||||
</record>
|
||||
|
||||
<record model="olap.level" id="level_crm_category">
|
||||
<field name="name">name</field>
|
||||
<field name="column_name" ref="res_partner_name"></field>
|
||||
<field name="column_id_name">name</field>
|
||||
<field name="table_name">res_partner</field>
|
||||
<field name="hierarchy_id" ref="hierarchy_crm_customer"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<record model="olap.dimension" id="dimension_crm_channel">
|
||||
<field name="name">Channels</field>
|
||||
<field name="cube_id" ref="cube_crm"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="olap.hierarchy" id="hierarchy_crm_channel">
|
||||
<field name="name">Channel</field>
|
||||
<field name="dimension_id" ref="dimension_crm_channel"/>
|
||||
<field name="table_id" ref="crm_cube_channel_table"/>
|
||||
</record>
|
||||
|
||||
<record model="olap.level" id="level_crm_channel">
|
||||
<field name="name">Channel</field>
|
||||
<field name="column_name" ref="res_partner_canal_name"></field>
|
||||
<field name="column_id_name">name</field>
|
||||
<field name="table_name">res_partner_canal</field>
|
||||
<field name="hierarchy_id" ref="hierarchy_crm_channel"/>
|
||||
<field name="sequence">1</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
Measures
|
||||
-->
|
||||
|
||||
<record model="olap.measure" id="measure_crm_total_cases">
|
||||
<field name="name">Total Cases</field>
|
||||
<field name="cube_id" ref="cube_crm"/>
|
||||
<field name="measure_type">sql_expr</field>
|
||||
<field name="value_sql">count(crm_case.id)</field>
|
||||
</record>
|
||||
|
||||
<record model="olap.measure" id="measure_crm_avg_planned_cost">
|
||||
<field name="name">Average Planned Revenue</field>
|
||||
<field name="cube_id" ref="cube_crm"/>
|
||||
<field name="measure_type">sql_expr</field>
|
||||
<field name="value_sql">avg(crm_case.planned_revenue)</field>
|
||||
<field name="formatstring">cr_postfix_comma</field>
|
||||
</record>
|
||||
|
||||
<record model="olap.measure" id="measure_crm_avg_planned_revenue">
|
||||
<field name="name">Average Planned Cost</field>
|
||||
<field name="cube_id" ref="cube_crm"/>
|
||||
<field name="measure_type">sql_expr</field>
|
||||
<field name="value_sql">avg(crm_case.planned_cost)</field>
|
||||
<field name="formatstring">cr_postfix_comma</field>
|
||||
</record>
|
||||
|
||||
<record model="olap.measure" id="measure_planned_revenue">
|
||||
<field name="name">Planned Revenue</field>
|
||||
<field name="cube_id" ref="cube_crm"/>
|
||||
<field name="value_column" ref="crm_case_planned_cost"></field>
|
||||
<field name="value_column_id_name">planned_cost</field>
|
||||
<field name="table_name">crm_case</field>
|
||||
<field name="agregator">sum</field>
|
||||
<field name="formatstring">cr_postfix_comma</field>
|
||||
</record>
|
||||
|
||||
<record model="olap.measure" id="measure_planned_revenue">
|
||||
<field name="name">Planned Revenue</field>
|
||||
<field name="cube_id" ref="cube_crm"/>
|
||||
<field name="value_column" ref="crm_case_planned_revenue"></field>
|
||||
<field name="value_column_id_name">planned_revenue</field>
|
||||
<field name="table_name">crm_case</field>
|
||||
<field name="agregator">sum</field>
|
||||
</record>
|
||||
|
||||
<record model="olap.measure" id="measure_probability">
|
||||
<field name="name">Probability</field>
|
||||
<field name="cube_id" ref="cube_crm"/>
|
||||
<field name="value_column" ref="crm_case_probability"></field>
|
||||
<field name="value_column_id_name">probability</field>
|
||||
<field name="table_name">crm_case</field>
|
||||
<field name="agregator">sum</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,23 +0,0 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import olap_extract
|
||||
import wizard_olap_extract
|
||||
@@ -1,37 +0,0 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
{
|
||||
"name" : "Module to extracts the schema structure",
|
||||
"version" : "0.1",
|
||||
"author" : "OpenERP SA",
|
||||
"website" : "http://www.openerp.com",
|
||||
"depends" : ["olap"],
|
||||
"category" : "Generic Modules/Olap",
|
||||
"description": """
|
||||
Extracts the schema structure.
|
||||
""",
|
||||
"init_xml" : [],
|
||||
"update_xml" : ["olap_extract_wizard.xml"],
|
||||
"demo_xml" : [],
|
||||
"active": False,
|
||||
"installable": True
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
# Bulgarian translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-03-29 11:24+0000\n"
|
||||
"Last-Translator: Boris <boris.t.ivanov@gmail.com>\n"
|
||||
"Language-Team: Bulgarian <bg@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
|
||||
msgid "olap_extract"
|
||||
msgstr "olap_extract"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,ok:0
|
||||
msgid "OK"
|
||||
msgstr "ОК"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
|
||||
msgid "Olap Extract"
|
||||
msgstr "\"Olap\" извличане"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,description:olap_extract.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Extracts the schema structure.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Извлича структурата на схемата.\n"
|
||||
" "
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_field:olap.extract.schema,init,module_name:0
|
||||
msgid "Module Name"
|
||||
msgstr "Име на модула"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr "Отказ"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_view:olap.extract.schema,init:0
|
||||
msgid "New Module Name"
|
||||
msgstr "Име на новия модул"
|
||||
@@ -1,56 +0,0 @@
|
||||
# German translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-03-20 20:41+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: German <de@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
|
||||
msgid "olap_extract"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,ok:0
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
|
||||
msgid "Olap Extract"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,description:olap_extract.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Extracts the schema structure.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_field:olap.extract.schema,init,module_name:0
|
||||
msgid "Module Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_view:olap.extract.schema,init:0
|
||||
msgid "New Module Name"
|
||||
msgstr ""
|
||||
@@ -1,59 +0,0 @@
|
||||
# Spanish translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-04-11 21:55+0000\n"
|
||||
"Last-Translator: Juan Eduardo Riva <juaneduardoriva@gmail.com>\n"
|
||||
"Language-Team: Spanish <es@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
|
||||
msgid "olap_extract"
|
||||
msgstr "olap_extract"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,ok:0
|
||||
msgid "OK"
|
||||
msgstr "Aceptar"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
|
||||
msgid "Olap Extract"
|
||||
msgstr "Estracto Olap"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,description:olap_extract.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Extracts the schema structure.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Extraer la estructura del esquema\n"
|
||||
" "
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_field:olap.extract.schema,init,module_name:0
|
||||
msgid "Module Name"
|
||||
msgstr "Nombre de módulo"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_view:olap.extract.schema,init:0
|
||||
msgid "New Module Name"
|
||||
msgstr "Nombre del Módulo Nuevo"
|
||||
@@ -1,59 +0,0 @@
|
||||
# Spanish translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-09-19 00:07+0000\n"
|
||||
"Last-Translator: Juan Eduardo Riva <juaneduardoriva@gmail.com>\n"
|
||||
"Language-Team: Spanish <es@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
|
||||
msgid "olap_extract"
|
||||
msgstr "olap_extract"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,ok:0
|
||||
msgid "OK"
|
||||
msgstr "Aceptar"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
|
||||
msgid "Olap Extract"
|
||||
msgstr "Estracto Olap"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,description:olap_extract.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Extracts the schema structure.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Extraer la estructura del esquema\n"
|
||||
" "
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_field:olap.extract.schema,init,module_name:0
|
||||
msgid "Module Name"
|
||||
msgstr "Nombre de módulo"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_view:olap.extract.schema,init:0
|
||||
msgid "New Module Name"
|
||||
msgstr "Nombre del Módulo Nuevo"
|
||||
@@ -1,56 +0,0 @@
|
||||
# Estonian translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-05-05 21:38+0000\n"
|
||||
"Last-Translator: lyyser <Unknown>\n"
|
||||
"Language-Team: Estonian <et@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
|
||||
msgid "olap_extract"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,ok:0
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
|
||||
msgid "Olap Extract"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,description:olap_extract.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Extracts the schema structure.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_field:olap.extract.schema,init,module_name:0
|
||||
msgid "Module Name"
|
||||
msgstr "Mooduli nimi"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr "Katkesta"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_view:olap.extract.schema,init:0
|
||||
msgid "New Module Name"
|
||||
msgstr "Uus mooduli nimi"
|
||||
@@ -1,59 +0,0 @@
|
||||
# French translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-05-21 14:54+0000\n"
|
||||
"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ <Unknown>\n"
|
||||
"Language-Team: French <fr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
|
||||
msgid "olap_extract"
|
||||
msgstr "olap_extract"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,ok:0
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
|
||||
msgid "Olap Extract"
|
||||
msgstr "Extraction Olap"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,description:olap_extract.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Extracts the schema structure.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Extraire la structure du schéma.\n"
|
||||
" "
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_field:olap.extract.schema,init,module_name:0
|
||||
msgid "Module Name"
|
||||
msgstr "Nom du module"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr "Annuler"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_view:olap.extract.schema,init:0
|
||||
msgid "New Module Name"
|
||||
msgstr "Nouveau nom de module"
|
||||
@@ -1,54 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * olap_extract
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29:21+0000\n"
|
||||
"PO-Revision-Date: 2009-11-26 05:29:21+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
|
||||
msgid "olap_extract"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,ok:0
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
|
||||
msgid "Olap Extract"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,description:olap_extract.module_meta_information
|
||||
msgid "\n"
|
||||
" Extracts the schema structure.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_field:olap.extract.schema,init,module_name:0
|
||||
msgid "Module Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_view:olap.extract.schema,init:0
|
||||
msgid "New Module Name"
|
||||
msgstr ""
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
# Croatian translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-03-02 23:44+0000\n"
|
||||
"Last-Translator: goranc <goranc@gmail.com>\n"
|
||||
"Language-Team: Croatian <hr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
|
||||
msgid "olap_extract"
|
||||
msgstr "olap_extract"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,ok:0
|
||||
msgid "OK"
|
||||
msgstr "U redu"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
|
||||
msgid "Olap Extract"
|
||||
msgstr "Olap izvajanje"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,description:olap_extract.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Extracts the schema structure.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Izdvajanje strukture sheme.\n"
|
||||
" "
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_field:olap.extract.schema,init,module_name:0
|
||||
msgid "Module Name"
|
||||
msgstr "Naziv modula"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr "Odustani"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_view:olap.extract.schema,init:0
|
||||
msgid "New Module Name"
|
||||
msgstr "Novi naziv modula"
|
||||
@@ -1,56 +0,0 @@
|
||||
# Indonesian translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-05-28 10:43+0000\n"
|
||||
"Last-Translator: Abdul Munif Hanafi <Unknown>\n"
|
||||
"Language-Team: Indonesian <id@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
|
||||
msgid "olap_extract"
|
||||
msgstr "olap_extract"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,ok:0
|
||||
msgid "OK"
|
||||
msgstr "Setuju"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
|
||||
msgid "Olap Extract"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,description:olap_extract.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Extracts the schema structure.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_field:olap.extract.schema,init,module_name:0
|
||||
msgid "Module Name"
|
||||
msgstr "Nama Modul"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr "Batal"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_view:olap.extract.schema,init:0
|
||||
msgid "New Module Name"
|
||||
msgstr "Nama Modul Baru"
|
||||
@@ -1,59 +0,0 @@
|
||||
# Italian translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-09-29 11:25+0000\n"
|
||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||
"Language-Team: Italian <it@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-30 04:43+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
|
||||
msgid "olap_extract"
|
||||
msgstr "olap_extract"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,ok:0
|
||||
msgid "OK"
|
||||
msgstr "Ok"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
|
||||
msgid "Olap Extract"
|
||||
msgstr "Estrazione OLAP"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,description:olap_extract.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Extracts the schema structure.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Estrae la struttura dello schema.\n"
|
||||
" "
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_field:olap.extract.schema,init,module_name:0
|
||||
msgid "Module Name"
|
||||
msgstr "Nome Modulo"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr "Annulla"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_view:olap.extract.schema,init:0
|
||||
msgid "New Module Name"
|
||||
msgstr "Nome del nuovo modulo"
|
||||
@@ -1,56 +0,0 @@
|
||||
# Occitan (post 1500) translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-03-12 13:38+0000\n"
|
||||
"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
|
||||
"Language-Team: Occitan (post 1500) <oc@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
|
||||
msgid "olap_extract"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,ok:0
|
||||
msgid "OK"
|
||||
msgstr "D'acòrdi"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
|
||||
msgid "Olap Extract"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,description:olap_extract.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Extracts the schema structure.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_field:olap.extract.schema,init,module_name:0
|
||||
msgid "Module Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr "Anullar"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_view:olap.extract.schema,init:0
|
||||
msgid "New Module Name"
|
||||
msgstr ""
|
||||
@@ -1,54 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * olap_extract
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29:21+0000\n"
|
||||
"PO-Revision-Date: 2009-11-26 05:29:21+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
|
||||
msgid "olap_extract"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,ok:0
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
|
||||
msgid "Olap Extract"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,description:olap_extract.module_meta_information
|
||||
msgid "\n"
|
||||
" Extracts the schema structure.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_field:olap.extract.schema,init,module_name:0
|
||||
msgid "Module Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_view:olap.extract.schema,init:0
|
||||
msgid "New Module Name"
|
||||
msgstr ""
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
# Brazilian Portuguese translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-03-24 01:31+0000\n"
|
||||
"Last-Translator: Pedro_Maschio <pedro.bicudo@tgtconsult.com.br>\n"
|
||||
"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
|
||||
msgid "olap_extract"
|
||||
msgstr "olap_extract"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,ok:0
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
|
||||
msgid "Olap Extract"
|
||||
msgstr "Extrato OLAP"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,description:olap_extract.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Extracts the schema structure.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Extrato do esquema de estrutura\n"
|
||||
" "
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_field:olap.extract.schema,init,module_name:0
|
||||
msgid "Module Name"
|
||||
msgstr "Nome do Módulo"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_view:olap.extract.schema,init:0
|
||||
msgid "New Module Name"
|
||||
msgstr "Novo Nome do Módulo"
|
||||
@@ -1,56 +0,0 @@
|
||||
# Russian translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-02-24 03:47+0000\n"
|
||||
"Last-Translator: DronAn[BY] <andyak77@mail.ru>\n"
|
||||
"Language-Team: Russian <ru@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
|
||||
msgid "olap_extract"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,ok:0
|
||||
msgid "OK"
|
||||
msgstr "Ок"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
|
||||
msgid "Olap Extract"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,description:olap_extract.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Extracts the schema structure.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_field:olap.extract.schema,init,module_name:0
|
||||
msgid "Module Name"
|
||||
msgstr "Имя Модуля"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr "Отменить"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_view:olap.extract.schema,init:0
|
||||
msgid "New Module Name"
|
||||
msgstr "Новое Имя модуля"
|
||||
@@ -1,56 +0,0 @@
|
||||
# Slovenian translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-01-27 14:21+0000\n"
|
||||
"Last-Translator: Simon Vidmar <Unknown>\n"
|
||||
"Language-Team: Slovenian <sl@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
|
||||
msgid "olap_extract"
|
||||
msgstr "olap_extract"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,ok:0
|
||||
msgid "OK"
|
||||
msgstr "V redu"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
|
||||
msgid "Olap Extract"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,description:olap_extract.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Extracts the schema structure.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_field:olap.extract.schema,init,module_name:0
|
||||
msgid "Module Name"
|
||||
msgstr "Ime modula"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr "Prekliči"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_view:olap.extract.schema,init:0
|
||||
msgid "New Module Name"
|
||||
msgstr "Novo ime modula"
|
||||
@@ -1,56 +0,0 @@
|
||||
# Swedish translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-02-14 18:46+0000\n"
|
||||
"Last-Translator: Treecko <Unknown>\n"
|
||||
"Language-Team: Swedish <sv@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
|
||||
msgid "olap_extract"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,ok:0
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
|
||||
msgid "Olap Extract"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,description:olap_extract.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Extracts the schema structure.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_field:olap.extract.schema,init,module_name:0
|
||||
msgid "Module Name"
|
||||
msgstr "Modulnamn"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr "Avbryt"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_view:olap.extract.schema,init:0
|
||||
msgid "New Module Name"
|
||||
msgstr "Nytt modulnamn"
|
||||
@@ -1,56 +0,0 @@
|
||||
# Chinese (Simplified) translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
|
||||
"PO-Revision-Date: 2010-04-08 02:07+0000\n"
|
||||
"Last-Translator: Silence <Unknown>\n"
|
||||
"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-09-29 05:16+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
|
||||
msgid "olap_extract"
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,ok:0
|
||||
msgid "OK"
|
||||
msgstr "确定"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
|
||||
msgid "Olap Extract"
|
||||
msgstr "Olap提取"
|
||||
|
||||
#. module: olap_extract
|
||||
#: model:ir.module.module,description:olap_extract.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" Extracts the schema structure.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_field:olap.extract.schema,init,module_name:0
|
||||
msgid "Module Name"
|
||||
msgstr "模块名称"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_button:olap.extract.schema,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr "取消"
|
||||
|
||||
#. module: olap_extract
|
||||
#: wizard_view:olap.extract.schema,init:0
|
||||
msgid "New Module Name"
|
||||
msgstr "新的模块名"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user