equal
deleted
inserted
replaced
518 if tr is None: |
518 if tr is None: |
519 msg = session._("transition doesn't belong to entity's workflow") |
519 msg = session._("transition doesn't belong to entity's workflow") |
520 raise ValidationError(entity.eid, {'by_transition': msg}) |
520 raise ValidationError(entity.eid, {'by_transition': msg}) |
521 if not tr.has_input_state(fromstate): |
521 if not tr.has_input_state(fromstate): |
522 msg = session._("transition isn't allowed") |
522 msg = session._("transition isn't allowed") |
|
523 print tr.name, fromstate.name, entity.by_transition |
523 raise ValidationError(entity.eid, {'by_transition': msg}) |
524 raise ValidationError(entity.eid, {'by_transition': msg}) |
524 if not tr.may_be_fired(foreid): |
525 if not tr.may_be_fired(foreid): |
525 msg = session._("transition may not be fired") |
526 msg = session._("transition may not be fired") |
526 raise ValidationError(entity.eid, {'by_transition': msg}) |
527 raise ValidationError(entity.eid, {'by_transition': msg}) |
527 if entity.get('to_state'): |
528 if entity.get('to_state'): |