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, ...@@ -374,17 +374,9 @@ class DeliveryLine(Movement, XMLObject, XMLMatrix, Variated,
security.declareProtected(Permissions.View, 'isDivergent') security.declareProtected(Permissions.View, 'isDivergent')
def isDivergent(self): def isDivergent(self):
""" Returns true if the delivery line is divergent
""" """
Returns 1 if the target is not met according to the current information return not self.getDivergenceList()
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
security.declareProtected(Permissions.View, 'getDivergenceList') security.declareProtected(Permissions.View, 'getDivergenceList')
def getDivergenceList(self): 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