Add an user and a comment field to workflow transitions log. Index the datatime field of workflow logs.
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user