Changed comlex workflow automaticly set the identifier
This commit is contained in:
parent
d21185a449
commit
304887e8f3
@ -383,7 +383,7 @@ class Motion(SlideMixin, models.Model):
|
|||||||
if type(state) is int:
|
if type(state) is int:
|
||||||
state = State.objects.get(pk=state)
|
state = State.objects.get(pk=state)
|
||||||
|
|
||||||
if state.set_identifier:
|
if not state.dont_set_identifier:
|
||||||
self.set_identifier()
|
self.set_identifier()
|
||||||
self.state = state
|
self.state = state
|
||||||
|
|
||||||
@ -734,8 +734,11 @@ class State(models.Model):
|
|||||||
dont_set_new_version_active = models.BooleanField(default=False)
|
dont_set_new_version_active = models.BooleanField(default=False)
|
||||||
"""If true, new versions are not automaticly set active."""
|
"""If true, new versions are not automaticly set active."""
|
||||||
|
|
||||||
set_identifier = models.BooleanField(default=False)
|
dont_set_identifier = models.BooleanField(default=False)
|
||||||
"""If true, the motion get a identifier if the state change to this one."""
|
"""Decides if the motion gets an identifier.
|
||||||
|
|
||||||
|
If true, the motion does not get an identifier if the state change to
|
||||||
|
this one, else it does."""
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
"""Returns the name of the state."""
|
"""Returns the name of the state."""
|
||||||
|
@ -61,7 +61,8 @@ def create_builtin_workflows(sender, **kwargs):
|
|||||||
state_2_1 = State.objects.create(name=ugettext_noop('published'),
|
state_2_1 = State.objects.create(name=ugettext_noop('published'),
|
||||||
workflow=workflow_2,
|
workflow=workflow_2,
|
||||||
allow_support=True,
|
allow_support=True,
|
||||||
allow_submitter_edit=True)
|
allow_submitter_edit=True,
|
||||||
|
dont_set_identifier=True)
|
||||||
state_2_2 = State.objects.create(name=ugettext_noop('permitted'),
|
state_2_2 = State.objects.create(name=ugettext_noop('permitted'),
|
||||||
workflow=workflow_2,
|
workflow=workflow_2,
|
||||||
action_word=ugettext_noop('Permit'),
|
action_word=ugettext_noop('Permit'),
|
||||||
|
Loading…
Reference in New Issue
Block a user