--- a/src/pyams_content/workflow/__init__.py Tue Jan 16 14:24:44 2018 +0100
+++ b/src/pyams_content/workflow/__init__.py Tue Jan 16 15:24:29 2018 +0100
@@ -230,6 +230,11 @@
# Workflow actions
#
+def reset_publication_action(wf, context):
+ """Refuse version publication"""
+ IWorkflowPublicationInfo(context).reset(complete=True)
+
+
def publish_action(wf, context):
"""Publish version"""
request = check_request()
@@ -312,6 +317,7 @@
destination=CANCELED,
permission=MANAGE_CONTENT_PERMISSION,
condition=can_cancel_operation,
+ action=reset_publication_action,
menu_css_class='fa fa-fw fa-mail-reply',
view_name='wf-cancel-propose.html',
history_label=_("Publication request canceled"),
@@ -341,6 +347,7 @@
destination=REFUSED,
permission=PUBLISH_CONTENT_PERMISSION,
condition=can_manage_content,
+ action=reset_publication_action,
menu_css_class='fa fa-fw fa-thumbs-o-down',
view_name='wf-refuse.html',
history_label=_("Publication refused"),