Commit 3c4cece6 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

add a method that returns a list of (tester, simulation_movement) for each divergence.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36600 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent da9747ec
......@@ -963,3 +963,15 @@ class Delivery(XMLObject, ImmobilisationDelivery, CompositionMixin):
sim_movement_list = search_method(portal_type='Simulation Movement',
delivery_uid=movement_uid_list, **kw)
return sim_movement_list
def getDivergentTesterAndSimulationMovementList(self):
"""
This method returns a list of (tester, simulation_movement) for each divergence.
"""
divergent_tester_list = []
for simulation_movement in self._getAllRelatedSimulationMovementList():
rule = simulation_movement.getParentValue().getSpecialiseValue()
for tester in rule._getDivergenceTesterList(exclude_quantity=False):
if tester.explain(simulation_movement) not in (None, []):
divergent_tester_list.append((tester, simulation_movement))
return divergent_tester_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