Files
mayan-edms/mayan/apps/document_states/managers.py

10 lines
253 B
Python

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)