Add support to update the document indexes from workflow state changes.
Add a new workflow field called internal_name for easier workflow reference in document index templates. Generalize the PropertyHelper class. Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
13
mayan/apps/document_states/classes.py
Normal file
13
mayan/apps/document_states/classes.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from common.classes import PropertyHelper
|
||||
|
||||
|
||||
class DocumentStateHelper(PropertyHelper):
|
||||
@staticmethod
|
||||
@property
|
||||
def constructor(*args, **kwargs):
|
||||
return DocumentStateHelper(*args, **kwargs)
|
||||
|
||||
def get_result(self, name):
|
||||
return self.instance.workflows.get(workflow__internal_name=name)
|
||||
Reference in New Issue
Block a user