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):
return divergence_list
@UnrestrictedMethod
def updateCausalityState(self, **kw):
def updateCausalityState(self, solve_automatically=True, **kw):
"""
This is often called as an activity, it will check if the
deliver is convergent, and if so it will put the delivery
......@@ -380,7 +380,11 @@ class Delivery(XMLObject, ImmobilisationDelivery, CompositionMixin):
if isTransitionPossible(self, 'diverge') and \
isTransitionPossible(self, 'converge'):
if self.isDivergent(**kw):
self.diverge()
if solve_automatically and \
isTransitionPossible(self, 'solve_automatically'):
self.solveAutomatically()
else:
self.diverge()
else:
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