[Erp5-report] r36656 kazuhiko - /erp5/trunk/products/ERP5/Document/Delivery.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jun 28 21:45:08 CEST 2010
Author: kazuhiko
Date: Mon Jun 28 21:45:07 2010
New Revision: 36656
URL: http://svn.erp5.org?rev=36656&view=rev
Log:
try to solve divergence automatically if possible.
Modified:
erp5/trunk/products/ERP5/Document/Delivery.py
Modified: erp5/trunk/products/ERP5/Document/Delivery.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Delivery.py?rev=36656&r1=36655&r2=36656&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Delivery.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Delivery.py [utf8] Mon Jun 28 21:45:07 2010
@@ -369,7 +369,7 @@ class Delivery(XMLObject, Immobilisation
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, Immobilisation
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()
More information about the Erp5-report
mailing list