Commit b46d73bd authored by Alexandre Boeglin's avatar Alexandre Boeglin

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.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16702 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0421df6f
......@@ -36,6 +36,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
parent_to_movement_simulation_state = {
......@@ -131,7 +133,7 @@ class SimulationMovement(Movement):
"""
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')
......
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