Commit 7cca32e1 authored by Jean-Paul Smets's avatar Jean-Paul Smets

getRelatedQuantity becomes getSimulationQauntity

initial simulation propagation API


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1181 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1df28225
......@@ -484,7 +484,7 @@ Une ligne tarifaire."""
return error_list
# Simulation Consistency Check
def getRelatedQuantity(self):
def getSimulationQuantity(self):
"""
Computes the quantities in the simulation
"""
......@@ -493,7 +493,7 @@ Une ligne tarifaire."""
return result[0].quantity
return None
def getRelatedTargetQuantity(self):
def getSimulationTargetQuantity(self):
"""
Computes the target quantities in the simulation
"""
......@@ -501,3 +501,32 @@ Une ligne tarifaire."""
if len(result) > 0:
return result[0].target_quantity
return None
def getSimulationSourceList(self):
"""
Computes the sources in the simulation
"""
result = self.DeliveryLine_zGetRelatedSource(uid=self.getUid())
return map(lambda x: x.source, result)
def getSimulationDestinationList(self):
"""
Computes the destinations in the simulation
"""
result = self.DeliveryLine_zGetRelatedDestination(uid=self.getUid())
return map(lambda x: x.destination, result)
def getSimulationSourceSectionList(self):
"""
Computes the source sections in the simulation
"""
result = self.DeliveryLine_zGetRelatedSourceSection(uid=self.getUid())
return map(lambda x: x.source_section, result)
def getSimulationDestinationSectionList(self):
"""
Computes the destination sections in the simulation
"""
result = self.DeliveryLine_zGetRelatedDestinationSection(uid=self.getUid())
return map(lambda x: x.destination_section, result)
\ No newline at end of file
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