Commit 1ed5ff3f authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

add searchDeliverySolverList() in mixin/solver.py that is used by UI.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36951 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7119bf03
...@@ -46,3 +46,15 @@ class SolverMixin: ...@@ -46,3 +46,15 @@ class SolverMixin:
def getPortalTypeValue(self): def getPortalTypeValue(self):
return self.getPortalObject().portal_solvers._getOb(self.getPortalType()) return self.getPortalObject().portal_solvers._getOb(self.getPortalType())
def searchDeliverySolverList(self, **kw):
"""
this method returns a list of delivery solvers
XXX here we cannot test delivery solver as a predicate, because
predicate's context should be Solver Decision, not a target
solver.
"""
target_solver_type = self.getPortalTypeValue()
solver_list = target_solver_type.getDeliverySolverValueList()
return solver_list
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