equal
deleted
inserted
replaced
535 if tr is None: |
535 if tr is None: |
536 msg = session._("transition doesn't belong to entity's workflow") |
536 msg = session._("transition doesn't belong to entity's workflow") |
537 raise ValidationError(entity.eid, {'by_transition': msg}) |
537 raise ValidationError(entity.eid, {'by_transition': msg}) |
538 if not tr.has_input_state(fromstate): |
538 if not tr.has_input_state(fromstate): |
539 _ = session._ |
539 _ = session._ |
540 msg = _("transition %s isn't allowed from %s") % (_(tr.name), _(fromstate.name)) |
540 msg = _("transition %(tr)s isn't allowed from %(st)s") % {'tr': _(tr.name), |
|
541 'st': _(fromstate.name), |
|
542 } |
541 raise ValidationError(entity.eid, {'by_transition': msg}) |
543 raise ValidationError(entity.eid, {'by_transition': msg}) |
542 if not tr.may_be_fired(foreid): |
544 if not tr.may_be_fired(foreid): |
543 msg = session._("transition may not be fired") |
545 msg = session._("transition may not be fired") |
544 raise ValidationError(entity.eid, {'by_transition': msg}) |
546 raise ValidationError(entity.eid, {'by_transition': msg}) |
545 if entity.get('to_state'): |
547 if entity.get('to_state'): |