diff options
| author | xrg@hellug.gr <> | 2010-09-03 00:04:51 +0300 |
|---|---|---|
| committer | xrg@hellug.gr <> | 2010-09-03 00:04:51 +0300 |
| commit | 7d57771833bf2c2b2bf3b5f3ba5e15918d88c977 (patch) | |
| tree | c6b9638d5060c26dddc74ef9bf1eb7a9435e077a /addons/base_module_quality/base_module_quality.py | |
| parent | d67d284e003c28a56ab4c2e23731158001d24f78 (diff) | |
[FIX] base_module_quality: log, fix workflow test
When no wkf_ids are located for the module, search() must be skipped and
have instead an empty list of activities. Otherwise, all the activities
for all modules would be selected, breaking the test
bzr revid: xrg@hellug.gr-20100902210451-30eaz5vdtplhjlgr
Diffstat (limited to 'addons/base_module_quality/base_module_quality.py')
| -rw-r--r-- | addons/base_module_quality/base_module_quality.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/base_module_quality/base_module_quality.py b/addons/base_module_quality/base_module_quality.py index c19bd37f97f..148adefdcd8 100644 --- a/addons/base_module_quality/base_module_quality.py +++ b/addons/base_module_quality/base_module_quality.py @@ -26,6 +26,7 @@ import tools from tools import config from tools.translate import _ from osv import osv, fields +import logging class abstract_quality_check(object): ''' @@ -80,6 +81,7 @@ class abstract_quality_check(object): #This variable used to give message if test result is good or not self.message = '' + self.log = logging.getLogger('module.quality') #The tests have to subscribe itselfs in this list, that contains #all the test that have to be performed. @@ -111,9 +113,11 @@ class abstract_quality_check(object): model_data = pool.get('ir.model.data').browse(cr, uid, ids2) for model in model_data: model_list.append(model.res_id) + self.log.debug('get_objects() model_list: %s', ','.join(model_list)) obj_list = [] for mod in pool.get('ir.model').browse(cr, uid, model_list): obj_list.append(str(mod.model)) + self.log.debug('get_objects() obj_list: %s', ','.join(obj_list)) return obj_list def get_model_ids(self, cr, uid, models=[]): @@ -121,6 +125,7 @@ class abstract_quality_check(object): if not models: return [] pool = pooler.get_pool(cr.dbname) + self.log.debug('get_model_ids([%s])', ', '.join(models)) return pool.get('ir.model').search(cr, uid, [('model', 'in', models)]) def get_ids(self, cr, uid, object_list): |
