summaryrefslogtreecommitdiff
path: root/addons/base_module_quality/base_module_quality.py
diff options
context:
space:
mode:
authorFabien Pinckaers <fp@tinyerp.com>2009-01-09 07:34:31 +0100
committerFabien Pinckaers <fp@tinyerp.com>2009-01-09 07:34:31 +0100
commitaa188ff42307d97dbc2fa40c5942c73cf3b47609 (patch)
tree0621cc582f11ec07284daa4b4f4fd68da508f059 /addons/base_module_quality/base_module_quality.py
parent991d683215c0f10bfe91f5f870af18746739f59f (diff)
parent3822eeb075b98701c34c42ec448594fde251b505 (diff)
bugfix
bzr revid: fp@tinyerp.com-20090109063431-pzzbjcsymkucist2
Diffstat (limited to 'addons/base_module_quality/base_module_quality.py')
-rw-r--r--addons/base_module_quality/base_module_quality.py23
1 files changed, 13 insertions, 10 deletions
diff --git a/addons/base_module_quality/base_module_quality.py b/addons/base_module_quality/base_module_quality.py
index 6db637ab32e..4590a51dfe3 100644
--- a/addons/base_module_quality/base_module_quality.py
+++ b/addons/base_module_quality/base_module_quality.py
@@ -21,11 +21,12 @@
##############################################################################
import pooler
import os
+import osv
from tools import config
class abstract_quality_check(object):
'''
- This Class provide...
+ This Class provides...
'''
def __init__(self):
@@ -40,6 +41,9 @@ class abstract_quality_check(object):
#This char have to store the name of the test.
self.name = ""
+ #This char have to store the aim of the test and eventually a note.
+ self.note = ""
+
#This char have to store the result.
#Used to display the result of the test.
self.result = ""
@@ -77,7 +81,8 @@ class abstract_quality_check(object):
'''
this method should do the test and fill the score, result and result_details var
'''
- raise 'Not Implemented'
+
+ raise osv.except_osv(_('Programming Error'), _('Test Is Not Implemented'))
def get_objects(self, cr, uid, module):
# This function returns all object of the given module..
@@ -103,14 +108,12 @@ class abstract_quality_check(object):
def format_table(self, header=[], data_list=[]):
detail = ""
- header_list = []
- final_list = []
- for head in data_list[1]:
- header_list.append(head)
- detail += (header[0]) % tuple(header_list)
- for res in data_list[0]:
- data_list[0][res].append(res)
- detail += (header[1]) % tuple(data_list[0][res])
+ detail += (header[0]) % tuple(header[1])
+ frow = '\n|-'
+ for i in header[1]:
+ frow += '\n| %s'
+ for key, value in data_list.items():
+ detail += (frow) % tuple(value)
detail = detail + '\n|}'
return detail