[Erp5-report] r28088 - /erp5/trunk/products/ERP5/Document/ImmobilisationMovement.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jul 16 10:12:48 CEST 2009
Author: jerome
Date: Thu Jul 16 10:12:47 2009
New Revision: 28088
URL: http://svn.erp5.org?rev=28088&view=rev
Log:
getImmobilisationState should not fail if we are not chained to an
immobilisation workflow
Modified:
erp5/trunk/products/ERP5/Document/ImmobilisationMovement.py
Modified: erp5/trunk/products/ERP5/Document/ImmobilisationMovement.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/ImmobilisationMovement.py?rev=28088&r1=28087&r2=28088&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/ImmobilisationMovement.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/ImmobilisationMovement.py [utf8] Thu Jul 16 10:12:47 2009
@@ -380,7 +380,11 @@
'getImmobilisationState')
def getImmobilisationState(self):
"""
- Return root delivery immobilisation state
- """
- return self.getRootDeliveryValue().getImmobilisationState()
-
+ Return root delivery immobilisation state, or None if this is not chained
+ to an immobilisation workflow
+ """
+ root_delivery = self.getRootDeliveryValue()
+ if getattr(root_delivery, 'getImmobilisationState', None) is not None:
+ return root_delivery.getImmobilisationState()
+
+
More information about the Erp5-report
mailing list