oops, fix wf entity types vocabulary while in creation stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 16 Nov 2009 19:42:27 +0100
branchstable
changeset 3868 161a5f7d1190
parent 3867 06ac8f00a99f
child 3871 983acb2b303b
oops, fix wf entity types vocabulary while in creation
web/views/workflow.py
--- a/web/views/workflow.py	Mon Nov 16 19:05:54 2009 +0100
+++ b/web/views/workflow.py	Mon Nov 16 19:42:27 2009 +0100
@@ -214,7 +214,7 @@
 class TransitionEditionForm(autoform.AutomaticEntityForm):
     __select__ = entity_implements('Transition')
 
-    def workflow_transition_for_relation(self, targetrelation):
+    def workflow_states_for_relation(self, targetrelation):
         eids = self.edited_entity.linked_to('transition_of', 'subject')
         if eids:
             return workflow_items_for_relation(self.req, eids[0], 'state_of',
@@ -237,7 +237,7 @@
 
     def subject_allowed_transition_vocabulary(self, rtype, limit=None):
         if not self.edited_entity.has_eid():
-            eids = self.edited_entity.linked_to('transition_of', 'subject')
+            eids = self.edited_entity.linked_to('state_of', 'subject')
             if eids:
                 return workflow_items_for_relation(self.req, eids[0], 'transition_of',
                                                    'allowed_transition')