From 539d1537a881989dba91a4b4e3d5db850b377cd5 Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" Date: Tue, 30 Dec 2008 14:12:40 +0530 Subject: [PATCH] base module quality bzr revid: mra@tinyerp.com-20081230084240-go6c5djrruln1dtw --- .../base_module_quality_wizard.xml | 20 +++++++++++----- .../speed_test/speed_test.py | 2 +- .../wizard/module_quality_check.py | 24 ++++++++++++++----- 3 files changed, 33 insertions(+), 13 deletions(-) diff --git a/addons/base_module_quality/base_module_quality_wizard.xml b/addons/base_module_quality/base_module_quality_wizard.xml index f85c19ab6f7..a61d1f4e980 100644 --- a/addons/base_module_quality/base_module_quality_wizard.xml +++ b/addons/base_module_quality/base_module_quality_wizard.xml @@ -7,21 +7,29 @@ Results of Quality Checks wizard.quality.check form + +
+ + + + + +
+
+ + + Results of Quality Checks with detail + quality.check.detail + form
- - - - - -
diff --git a/addons/base_module_quality/speed_test/speed_test.py b/addons/base_module_quality/speed_test/speed_test.py index 248a500fa9c..49b10185129 100644 --- a/addons/base_module_quality/speed_test/speed_test.py +++ b/addons/base_module_quality/speed_test/speed_test.py @@ -101,7 +101,7 @@ class quality_test(base_module_quality.abstract_quality_check): summary = """ ===Speed Test===: - This test checks the speed of the module. +This test checks the speed of the module. """+ "Score: " + str(self.score) + "/10\n" else: diff --git a/addons/base_module_quality/wizard/module_quality_check.py b/addons/base_module_quality/wizard/module_quality_check.py index c0640d9a078..8394377b867 100644 --- a/addons/base_module_quality/wizard/module_quality_check.py +++ b/addons/base_module_quality/wizard/module_quality_check.py @@ -76,11 +76,12 @@ class wiz_quality_check(osv.osv_memory): string_ret += val.result['summary'] string_detail += val.result['detail'] self.string_detail = string_detail - return string_ret + return "" def _check_detail(self, cr, uid, data, context={}): return self.string_detail + # def _general_info(self, cr, uid, data, context={}): # return self.general_info @@ -98,16 +99,27 @@ class wiz_quality_check(osv.osv_memory): #~ 'result': {'type':'form', 'arch':form_check, 'fields':fields_check, 'state':[('end','Cancel'),('do','Do Test')]} #~ }, _columns = { - 'general_info': fields.text('General Info', readonly="1",), - 'detail' : fields.text('Detail', readonly="1",), - 'verbose_detail' : fields.text('Verbose Detail', readonly="1",) +# 'general_info': fields.text('General Info', readonly="1",), +# 'detail' : fields.text('Detail', readonly="0",), + 'verbose_detail' : fields.one2many('quality.check.detail', 'quality_check', 'Verbose Detail', readonly="0",) } _defaults = { - 'general_info': _check, - 'detail': _check_detail +# 'general_info': _check, +# 'detail': _check_detail + 'verbose_detail': _check, } wiz_quality_check() +class quality_check_detail(osv.osv_memory): + _name = 'quality.check.detail' + _rec_name = 'quality_check' + _columns = { + 'quality_check': fields.many2one('wizard.quality.check', 'Quality'), + 'general_info': fields.text('General Info', readonly="1",), + 'detail' : fields.text('Detail', readonly="1",), + } +quality_check_detail() + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: