Commit cdd8b6fd authored by Jean-Paul Smets's avatar Jean-Paul Smets

added getRelatedQuantity


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2480 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f67cdc68
......@@ -556,3 +556,26 @@ Une ligne tarifaire."""
"""
return self.getParent().getRootDeliveryValue()
# Simulation Consistency Check
def getRelatedQuantity(self):
"""
Computes the quantities in the simulation
"""
if not self.hasCellContent():
result = self.DeliveryLine_zGetRelatedQuantity(uid=self.getUid())
if len(result) > 0:
return result[0].quantity
return None
def getRelatedTargetQuantity(self):
"""
Computes the target quantities in the simulation
"""
if not self.hasCellContent():
result = self.DeliveryLine_zGetRelatedQuantity(uid=self.getUid())
if len(result) > 0:
return result[0].target_quantity
return None
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