# HG changeset patch # User Sylvain Thénault # Date 1251196364 -7200 # Node ID fed52d317ba733577b402601c3502036d8f5dcc1 # Parent 3dfe497e5afa8ff36a13978d430d5a4774ab7944 [wf] new .workflow property on states and transitions diff -r 3dfe497e5afa -r fed52d317ba7 entities/wfobjs.py --- a/entities/wfobjs.py Tue Aug 25 11:47:26 2009 +0200 +++ b/entities/wfobjs.py Tue Aug 25 12:32:44 2009 +0200 @@ -128,6 +128,10 @@ raise Exception('should not be instantiated') super(BaseTransition, self).__init__(*args, **kwargs) + @property + def workflow(self): + return self.transition_of[0] + def may_be_fired(self, eid): """return true if the logged user may fire this transition @@ -218,6 +222,10 @@ fetch_attrs, fetch_order = fetch_config(['name']) rest_attr = 'eid' + @property + def workflow(self): + return self.state_of[0] + def after_deletion_path(self): """return (path, parameters) which should be used as redirect information when this entity is being deleted