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