Commit 77f698e7 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

add SolverDecision.searchDeliverySolverList() that returns a list of possible...

add SolverDecision.searchDeliverySolverList() that returns a list of possible delivery solvers, as predicates against solver decision.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36870 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 69251605
......@@ -112,6 +112,17 @@ class SolverDecision(ConfigurableMixin, XMLObject):
else:
return solver_type.getConfigurationPropertyListDict(self)
def searchDeliverySolverList(self, **kw):
"""
this method returns a list of delivery solvers, as predicates against
solver decision.
"""
portal = self.getPortalObject()
portal_type_list = portal.getPortalDeliverySolverTypeList()
portal_solvers = portal.portal_solvers
return filter(lambda x:x.test(self),
[getattr(portal_solvers, x) for x in portal_type_list])
def getExplanationMessage(self, all=False):
"""
Returns the HTML message that describes the detail of divergences to
......
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