Commit 3c785ebb authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

If delivery is not simulated (PackingList.isDivergent() returns True in such a...

If delivery is not simulated (PackingList.isDivergent() returns True in such a case), we cannot solve divergence anyway. This change should fix recent (random) failures of testImmobilisation.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36787 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e0a61ebe
...@@ -380,7 +380,10 @@ class Delivery(XMLObject, ImmobilisationDelivery, CompositionMixin): ...@@ -380,7 +380,10 @@ class Delivery(XMLObject, ImmobilisationDelivery, CompositionMixin):
if isTransitionPossible(self, 'diverge') and \ if isTransitionPossible(self, 'diverge') and \
isTransitionPossible(self, 'converge'): isTransitionPossible(self, 'converge'):
if self.isDivergent(**kw): if self.isDivergent(**kw):
if solve_automatically and \ # If delivery is not simulated (PackingList.isDivergent()
# returns True in such a case), we cannot solve divergence
# anyway.
if self.isSimulated() and solve_automatically and \
isTransitionPossible(self, 'solve_automatically'): isTransitionPossible(self, 'solve_automatically'):
self.solveAutomatically() self.solveAutomatically()
else: else:
......
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