[Erp5-report] r16702 - /erp5/trunk/products/ERP5/Document/SimulationMovement.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Sep 28 15:26:01 CEST 2007


Author: alex
Date: Fri Sep 28 15:26:00 2007
New Revision: 16702

URL: http://svn.erp5.org?rev=16702&view=rev
Log:
Make sure that causality_state is not acquired form a parent movement,
otherwise there is a chance that getCausalityState returns "expanded", even
for a newly created - not yet expanded - movement.

Modified:
    erp5/trunk/products/ERP5/Document/SimulationMovement.py

Modified: erp5/trunk/products/ERP5/Document/SimulationMovement.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/SimulationMovement.py?rev=16702&r1=16701&r2=16702&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/SimulationMovement.py (original)
+++ erp5/trunk/products/ERP5/Document/SimulationMovement.py Fri Sep 28 15:26:00 2007
@@ -35,6 +35,8 @@
 from Products.ERP5.Document.Movement import Movement
 
 from zLOG import LOG
+
+from Acquisition import aq_base
 
 # XXX Do we need to create groups ? (ie. confirm group include confirmed, getting_ready and ready
 
@@ -131,7 +133,7 @@
     """
       Returns the current state in causality
     """
-    return getattr(self, 'causality_state', 'solved')
+    return getattr(aq_base(self), 'causality_state', 'solved')
 
   security.declareProtected( Permissions.ModifyPortalContent,
                              'setCausalityState')




More information about the Erp5-report mailing list