# HG changeset patch # User Adrien Di Mascio # Date 1253727780 -7200 # Node ID a0a2526432272ac70504758e286301c99cbba519 # Parent ad1cddc06997882d26e61a679b1d76c80279a747# Parent 265331a0920c0167267ee74f9d5b5942278bef2d merge diff -r ad1cddc06997 -r a0a252643227 entities/test/unittest_base.py --- a/entities/test/unittest_base.py Wed Sep 23 19:42:44 2009 +0200 +++ b/entities/test/unittest_base.py Wed Sep 23 19:43:00 2009 +0200 @@ -131,7 +131,7 @@ self.vreg._loadedmods[__name__] = {} for etype in ('Company', 'Division', 'SubDivision'): class Foo(AnyEntity): - id = etype + __regid__ = etype self.vreg.register_appobject_class(Foo) eclass = self.select_eclass('SubDivision') self.failUnless(eclass.__autogenerated__) diff -r ad1cddc06997 -r a0a252643227 hooks/workflow.py --- a/hooks/workflow.py Wed Sep 23 19:42:44 2009 +0200 +++ b/hooks/workflow.py Wed Sep 23 19:43:00 2009 +0200 @@ -172,7 +172,7 @@ raise ValidationError(entity.eid, {'by_transition': msg}) deststate = wf.state_by_eid(deststateeid) if not cowpowers and deststate is None: - msg = entity.req._("state doesn't belong to entity's workflow") + msg = session._("state doesn't belong to entity's workflow") raise ValidationError(entity.eid, {'to_state': msg}) else: # check transition is valid and allowed, unless we're coming back from @@ -196,7 +196,7 @@ if swtr is None: deststate = session.entity_from_eid(deststateeid) if not cowpowers and deststate is None: - msg = entity.req._("state doesn't belong to entity's workflow") + msg = session._("state doesn't belong to entity's workflow") raise ValidationError(entity.eid, {'to_state': msg}) else: deststateeid = tr.destination().eid @@ -226,7 +226,7 @@ wftr = forentity.subworkflow_input_transition() if wftr is None: # inconsistency detected - msg = entity.req._("state doesn't belong to entity's current workflow") + msg = session._("state doesn't belong to entity's current workflow") raise ValidationError(entity.eid, {'to_state': msg}) tostate = wftr.get_exit_point(entity['to_state']) if tostate is not None: