summaryrefslogtreecommitdiff
path: root/addons/base_module_quality/workflow_test
diff options
context:
space:
mode:
authormra (Open ERP) <mra@tinyerp.com>2009-08-28 12:54:57 +0530
committermra (Open ERP) <mra@tinyerp.com>2009-08-28 12:54:57 +0530
commitfc5d45c54aff32eba3c04c1b8a989c0cd1ece2ab (patch)
tree6f147ec3ea63e17b9c139fbdd789a12839e2a615 /addons/base_module_quality/workflow_test
parent466cdeb5d3c626161a59851e6820c527304a0922 (diff)
[IMP] base_module_quality: make minimal score for all test, add message if the score is below limit,varible for whether to activate the test or not
bzr revid: mra@tinyerp.com-20090828072457-en2vpm5l1514xtj7
Diffstat (limited to 'addons/base_module_quality/workflow_test')
-rw-r--r--addons/base_module_quality/workflow_test/workflow_test.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/base_module_quality/workflow_test/workflow_test.py b/addons/base_module_quality/workflow_test/workflow_test.py
index 76d2facd5b4..d31b13f1087 100644
--- a/addons/base_module_quality/workflow_test/workflow_test.py
+++ b/addons/base_module_quality/workflow_test/workflow_test.py
@@ -33,6 +33,7 @@ class quality_test(base_module_quality.abstract_quality_check):
self.name = _("Workflow Test")
self.note = _("This test checks where object has workflow or not on it if there is a state field and several buttons on it and also checks validity of workflow xml file")
self.bool_installed_only = True
+ self.min_score = 40
return None
def run_test(self, cr, uid, module_path):
@@ -116,7 +117,8 @@ class quality_test(base_module_quality.abstract_quality_check):
good_view += 1
score_avail = good_view and float(good_view) / float(bad_view + good_view)
self.score = (score_general + score_avail) / 2
-
+ if self.score*100 < self.min_score:
+ self.message = 'Score is below than minimal score(%s%%)' % self.min_score
if not wkf_ids and not bad_view:
self.error = True
self.result = _("No Workflow define")