Commit ce6223bc authored by Vincent Bechu's avatar Vincent Bechu

[erp5_officejs_appstore_base] Add tag for publication creation activities

/reviewed-on nexedi/erp5!689
parent 6c8accf3
...@@ -5,6 +5,7 @@ person = context.ERP5Site_getAuthenticatedMemberPersonValue() ...@@ -5,6 +5,7 @@ person = context.ERP5Site_getAuthenticatedMemberPersonValue()
# XXX Should Check that version of this software doesn't already exists # XXX Should Check that version of this software doesn't already exists
import hashlib import hashlib
version = hashlib.sha224("%s-%s" % (version_title, DateTime())).hexdigest()[:10] version = hashlib.sha224("%s-%s" % (version_title, DateTime())).hexdigest()[:10]
tag = "new_software_publication_" + version
# Create Software Publication # Create Software Publication
# It carries the software publication process # It carries the software publication process
...@@ -16,6 +17,8 @@ software_publication = portal.software_publication_module.newContent( ...@@ -16,6 +17,8 @@ software_publication = portal.software_publication_module.newContent(
reference="SP-" + version, reference="SP-" + version,
title='publication ' + version_title, title='publication ' + version_title,
start_date=DateTime(), start_date=DateTime(),
#Wait for all related documents indexation, to avoid issue with officejs submit alarm.
activate_kw={"after_tag": tag}
) )
# Create Software Release # Create Software Release
...@@ -25,6 +28,7 @@ software_release = portal.software_release_module.newContent( ...@@ -25,6 +28,7 @@ software_release = portal.software_release_module.newContent(
reference=version, reference=version,
title='release ' + version_title + '-' + version, title='release ' + version_title + '-' + version,
version=version_title, version=version_title,
activate_kw={"tag": tag}
) )
# Create Software Publication Line # Create Software Publication Line
...@@ -33,7 +37,8 @@ software_publication_line = software_publication.newContent( ...@@ -33,7 +37,8 @@ software_publication_line = software_publication.newContent(
title=software_publication.getTitle() + " Publication", title=software_publication.getTitle() + " Publication",
aggregate=[ aggregate=[
software_release.getRelativeUrl(), software_release.getRelativeUrl(),
] ],
activate_kw={"tag": tag}
) )
zip_file = software_publication.Base_contribute( zip_file = software_publication.Base_contribute(
...@@ -50,4 +55,5 @@ return software_publication.SoftwarePublication_attachSoftwareProduct( ...@@ -50,4 +55,5 @@ return software_publication.SoftwarePublication_attachSoftwareProduct(
title=title, title=title,
description=description, description=description,
product_line=product_line, product_line=product_line,
activate_kw={"tag": tag}
) )
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment