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:
Roberto Rosario
2015-01-13 06:02:42 -04:00
parent 8ff3747a15
commit b2453ee01e
8 changed files with 231 additions and 25 deletions

View 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)