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

Renamed to isSimulated


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@131 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 66a6999f
......@@ -490,6 +490,13 @@ une liste de mouvements..."""
"""
return not self.isDivergent()
security.declareProtected(Permissions.View, 'isSimulated')
def isSimulated(self):
for m in self.getMovementList():
if not m.isSimulated():
return 0
return 1
security.declareProtected(Permissions.View, 'isDivergent')
def isDivergent(self):
"""
......
......@@ -309,10 +309,10 @@ Une ligne tarifaire."""
for cell in self.contentValues(filter={'portal_type': 'Delivery Cell'}):
if cell.isDivergent():
return 1
if not cell.hasSimulationMovement():
if not cell.isSimulated():
return 1
else:
return Movement.isDivergent(self) or (not self.hasSimulationMovement())
return Movement.isDivergent(self) or (not self.isSimulated())
security.declareProtected(Permissions.ModifyPortalContent, 'applyTargetSolver')
def applyTargetSolver(self, solver):
......
......@@ -421,7 +421,7 @@ a service in a public administration)."""
return self.getDeliveryValue()
# Simulation
security.declareProtected(Permissions.View, 'hasSimulationMovement')
self hasSimulationMovement(self):
security.declareProtected(Permissions.View, 'isSimulated')
def isSimulated(self):
return len(self.getDeliveryRelatedValueList()) > 0 or len(self.getOrderRelatedValueList()) > 0
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