[Erp5-report] r35629 kazuhiko - /erp5/trunk/products/ERP5/Document/Delivery.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed May 26 08:13:42 CEST 2010
Author: kazuhiko
Date: Wed May 26 08:13:42 2010
New Revision: 35629
URL: http://svn.erp5.org?rev=35629&view=rev
Log:
if causality state is still draft, we don't need to call diverge() or solve() and it causes an exception if called.
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=35629&r1=35628&r2=35629&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Delivery.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Delivery.py [utf8] Wed May 26 08:13:42 2010
@@ -375,8 +375,10 @@
deliver is convergent, and if so it will put the delivery
in a solved state, if not convergent in a diverged state
"""
- if getattr(self, 'diverge', None) is not None \
- and getattr(self, 'converge', None) is not None:
+ isTransitionPossible = \
+ self.getPortalObject().portal_workflow.isTransitionPossible
+ if isTransitionPossible(self, 'diverge') and \
+ isTransitionPossible(self, 'converge'):
if self.isDivergent(**kw):
self.diverge()
else:
More information about the Erp5-report
mailing list