hooks/workflow.py
branchstable
changeset 5056 5de07c77d73f
parent 5030 5238d9a8dfee
child 5164 4d99cccffe36
--- a/hooks/workflow.py	Mon Mar 29 11:51:02 2010 +0200
+++ b/hooks/workflow.py	Mon Mar 29 11:51:46 2010 +0200
@@ -45,7 +45,7 @@
             state = entity.current_workflow.initial
             if state:
                 session.add_relation(entity.eid, 'in_state', state.eid)
-
+                _FireAutotransitionOp(session, entity=entity)
 
 class _FireAutotransitionOp(hook.Operation):
     """try to fire auto transition after state changes"""
@@ -86,6 +86,7 @@
                 if entity.current_state.eid != deststate.eid:
                     _change_state(session, entity.eid,
                                   entity.current_state.eid, deststate.eid)
+                    _FireAutotransitionOp(session, entity=entity)
                 return
             msg = session._('workflow changed to "%s"')
             msg %= session._(mainwf.name)