diff --git a/addons/olap/__openerp__.py b/addons/olap/__openerp__.py
index 933463638cc..bdca188a08f 100644
--- a/addons/olap/__openerp__.py
+++ b/addons/olap/__openerp__.py
@@ -46,7 +46,8 @@
"data/olap_security.xml",
'security/ir.model.access.csv'
],
- "demo_xml" : ["data/olap_demo.xml"],
+ "demo_xml" : ["data/olap_demo.xml",
+ "test/olap_test00.yml"],
"active": False,
"installable": True
}
diff --git a/addons/olap/data/olap_fact_view.xml b/addons/olap/data/olap_fact_view.xml
index b847101c7f1..f01db863f6e 100755
--- a/addons/olap/data/olap_fact_view.xml
+++ b/addons/olap/data/olap_fact_view.xml
@@ -274,7 +274,7 @@
-
+
@@ -322,7 +322,7 @@
-
+
@@ -337,9 +337,5 @@
id="menu_view_olap_application_field_form"
parent="menu_bi_conf_known_application"/>
-
-
-
-
diff --git a/addons/olap/test/olap_test00.yml b/addons/olap/test/olap_test00.yml
new file mode 100644
index 00000000000..af87950468f
--- /dev/null
+++ b/addons/olap/test/olap_test00.yml
@@ -0,0 +1,111 @@
+-
+ 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')]})
+
diff --git a/addons/olap/wizard/olap_load_column.py b/addons/olap/wizard/olap_load_column.py
index 422a50abcff..65517626d62 100644
--- a/addons/olap/wizard/olap_load_column.py
+++ b/addons/olap/wizard/olap_load_column.py
@@ -26,7 +26,6 @@ class olap_load_column(osv.osv_memory):
_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,