diff options
Diffstat (limited to 'addons/base_module_quality/base_module_quality.py')
| -rw-r--r-- | addons/base_module_quality/base_module_quality.py | 23 |
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 |
