Add view for associating a workflow to a document type, add support to auto launch a workflow instance when a document is created, allow associating a many workflows to a document, add view to display a document's workflows instances
This commit is contained in:
9
mayan/apps/document_states/managers.py
Normal file
9
mayan/apps/document_states/managers.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models
|
||||
|
||||
|
||||
class WorkflowManager(models.Manager):
|
||||
def launch_for(self, document):
|
||||
for workflow in document.document_type.workflows.all():
|
||||
workflow.launch_for(document)
|
||||
Reference in New Issue
Block a user