hooks/workflow.py
changeset 3890 d7a270f50f54
parent 3777 3ef8cdb5fb1c
child 3894 27cbf98ad863
--- a/hooks/workflow.py	Sun Nov 08 21:53:18 2009 +0100
+++ b/hooks/workflow.py	Fri Nov 20 19:35:54 2009 +0100
@@ -224,9 +224,10 @@
                     msg = session._("transition doesn't belong to entity's workflow")
                     raise ValidationError(entity.eid, {'by_transition': msg})
                 if not tr.has_input_state(fromstate):
-                    msg = session._("transition isn't allowed")
+                    msg = session._("transition %s isn't allowed from %s") % (
+                        _(tr.name), _(fromstate.name))
                     raise ValidationError(entity.eid, {'by_transition': msg})
-                if not tr.may_be_fired(foreid):
+                 if not tr.may_be_fired(foreid):
                     msg = session._("transition may not be fired")
                     raise ValidationError(entity.eid, {'by_transition': msg})
             if entity.get('to_state'):