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()
# XXX Should Check that version of this software doesn't already exists
import hashlib
version = hashlib.sha224("%s-%s" % (version_title, DateTime())).hexdigest()[:10]
tag = "new_software_publication_" + version
# Create Software Publication
# It carries the software publication process
......@@ -16,6 +17,8 @@ software_publication = portal.software_publication_module.newContent(
reference="SP-" + version,
title='publication ' + version_title,
start_date=DateTime(),
#Wait for all related documents indexation, to avoid issue with officejs submit alarm.
activate_kw={"after_tag": tag}
)
# Create Software Release
......@@ -25,6 +28,7 @@ software_release = portal.software_release_module.newContent(
reference=version,
title='release ' + version_title + '-' + version,
version=version_title,
activate_kw={"tag": tag}
)
# Create Software Publication Line
......@@ -33,7 +37,8 @@ software_publication_line = software_publication.newContent(
title=software_publication.getTitle() + " Publication",
aggregate=[
software_release.getRelativeUrl(),
]
],
activate_kw={"tag": tag}
)
zip_file = software_publication.Base_contribute(
......@@ -50,4 +55,5 @@ return software_publication.SoftwarePublication_attachSoftwareProduct(
title=title,
description=description,
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