Commit dcb43d02 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

try to solve divergence automatically if possible.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36656 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 65d4e649
...@@ -369,7 +369,7 @@ class Delivery(XMLObject, ImmobilisationDelivery, CompositionMixin): ...@@ -369,7 +369,7 @@ class Delivery(XMLObject, ImmobilisationDelivery, CompositionMixin):
return divergence_list return divergence_list
@UnrestrictedMethod @UnrestrictedMethod
def updateCausalityState(self, **kw): def updateCausalityState(self, solve_automatically=True, **kw):
""" """
This is often called as an activity, it will check if the This is often called as an activity, it will check if the
deliver is convergent, and if so it will put the delivery deliver is convergent, and if so it will put the delivery
...@@ -380,6 +380,10 @@ class Delivery(XMLObject, ImmobilisationDelivery, CompositionMixin): ...@@ -380,6 +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 \
isTransitionPossible(self, 'solve_automatically'):
self.solveAutomatically()
else:
self.diverge() self.diverge()
else: else:
self.converge() self.converge()
......
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