Commit 98eb7c53 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

partially revert r31126, because exclude_quantity argument can be useful and...

partially revert r31126, because exclude_quantity argument can be useful and there is no need to remove it.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31206 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 43d4da3b
...@@ -273,14 +273,22 @@ class RuleMixin: ...@@ -273,14 +273,22 @@ class RuleMixin:
""" """
raise NotImplementedError raise NotImplementedError
def _getDivergenceTesterList(self): def _getDivergenceTesterList(self, exclude_quantity=True):
""" """
Return the applicable divergence testers which must Return the applicable divergence testers which must
be used to test movement divergence. (ie. not all be used to test movement divergence. (ie. not all
divergence testers of the Rule) divergence testers of the Rule)
"""
return filter(lambda x:x.isTestingProvider(), self.objectValues( exclude_quantity -- if set to true, do not consider
portal_type=self.getPortalDivergenceTesterTypeList())) quantity divergence testers
"""
if exclude_quantity:
return filter(lambda x:x.isTestingProvider() and \
x.getTestedProperty() != 'quantity', self.objectValues(
portal_type=self.getPortalDivergenceTesterTypeList()))
else:
return filter(lambda x:x.isTestingProvider(), self.objectValues(
portal_type=self.getPortalDivergenceTesterTypeList()))
def _getMatchingTesterList(self): def _getMatchingTesterList(self):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment