Commit 0dd1767e authored by Jérome Perrin's avatar Jérome Perrin

simplify method


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35984 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 148ff976
......@@ -374,17 +374,9 @@ class DeliveryLine(Movement, XMLObject, XMLMatrix, Variated,
security.declareProtected(Permissions.View, 'isDivergent')
def isDivergent(self):
""" Returns true if the delivery line is divergent
"""
Returns 1 if the target is not met according to the current information
After and edit, the isOutOfTarget will be checked. If it is 1,
a message is emitted
emit targetUnreachable !
"""
if self.getDivergenceList() == []:
return 0
else:
return 1
return not self.getDivergenceList()
security.declareProtected(Permissions.View, 'getDivergenceList')
def getDivergenceList(self):
......
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