Commit 2ee339ac authored by Roque's avatar Roque

erp5_officejs_appstore_base: fix software publication reject

parent 86e2ffa7
......@@ -8,16 +8,23 @@ web_document_list = portal.portal_catalog(
validation_state="submitted",
)
for web_document in web_document_list:
web_document.cancel()
software_product = context.getFollowUpValue(portal_type="Software Product")
web_site = software_product.SoftwareProduct_getRelatedWebSite()
version_web_section = None
if software_release.getReference() in web_site:
version_web_section = web_site[software_release.getReference()]
#backward compatibily
if not version_web_section and software_release.getVersion() in web_site:
version_web_section = web_site[software_release.getVersion()]
if not version_web_section:
return
version_web_section = web_site[software_release.getVersion()]
version_web_section.setCriterion('validation_state', 'cancel')
version_web_section.setTitle("Rejected " + version_web_section.getTitle())
def webSectionUpdatePredicate(current_section):
......@@ -26,5 +33,3 @@ def webSectionUpdatePredicate(current_section):
webSectionUpdatePredicate(child_section)
webSectionUpdatePredicate(version_web_section)
#version_web_section.cancel()
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