Add an user and a comment field to workflow transitions log. Index the datatime field of workflow logs.

This commit is contained in:
Roberto Rosario
2015-01-24 17:28:30 -04:00
parent 01b040b4dd
commit fdecba281e
6 changed files with 254 additions and 6 deletions

View File

@@ -52,6 +52,10 @@ register_model_list_columns(WorkflowInstance, [
'name': _('Current state'),
'attribute': 'get_current_state'
},
{
'name': _('User'),
'attribute': encapsulate(lambda workflow: getattr(workflow.get_last_log_entry(), 'user', _('None')))
},
{
'name': _('Last transition'),
'attribute': 'get_last_transition'
@@ -78,10 +82,18 @@ register_model_list_columns(WorkflowInstanceLogEntry, [
'name': _('Date and time'),
'attribute': 'datetime'
},
{
'name': _('User'),
'attribute': 'user'
},
{
'name': _('Transition'),
'attribute': 'transition'
},
{
'name': _('Comment'),
'attribute': 'comment'
},
])
register_links([Document], [link_document_workflow_instance_list], menu_name='form_header')