Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
8158b09e
Commit
8158b09e
authored
May 16, 2016
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs_appstore_base: Various fixes
parent
ddf3d1ea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareProduct_createSoftwarePublication.py
...ppstore_base/SoftwareProduct_createSoftwarePublication.py
+3
-2
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareRelease_publishRelatedWebDocument.py
...ppstore_base/SoftwareRelease_publishRelatedWebDocument.py
+7
-3
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/WebManifest_createCloneFile.py
...rp5_officejs_appstore_base/WebManifest_createCloneFile.py
+2
-0
No files found.
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareProduct_createSoftwarePublication.py
View file @
8158b09e
...
...
@@ -26,7 +26,7 @@ software_release = portal.software_release_module.newContent(
title
=
context
.
getTitle
()
+
' release '
+
version_title
+
'-'
+
version
,
# XXX the follow_up lkink is actually nonsense and redundant
follow_up
=
context
.
getRelativeUrl
(),
version
=
version
,
version
=
version
_title
,
)
# Create Software Publication Line
...
...
@@ -49,7 +49,7 @@ section.edit(
title
=
"%s %s"
%
(
context
.
getTitle
(),
version_title
),
short_title
=
context
.
getTitle
(),
description
=
context
.
getDescription
(),
id
=
version
,
id
=
version
_title
,
)
section
.
setCriterionPropertyList
([
...
...
@@ -59,6 +59,7 @@ section.setCriterionPropertyList([
section
.
setCriterion
(
'version'
,
version
)
section
.
setCriterion
(
'validation_state'
,
'submitted'
)
section
.
setMembershipCriterionCategoryList
([
'follow_up/'
+
software_release
.
getRelativeUrl
()])
# Clone all curent Web Document and share them with the correct Version
web_document_list
=
portal
.
portal_catalog
(
...
...
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareRelease_publishRelatedWebDocument.py
View file @
8158b09e
...
...
@@ -29,6 +29,10 @@ version_web_section = web_site[software_release.getVersion()]
version_web_section
.
setCriterion
(
'validation_state'
,
'published'
)
version_web_section
.
publish
()
web_site
.
edit
(
configuration_latest_version
=
software_release
.
getVersion
(),
)
# Is latest Websection what we want?
if
"latest"
not
in
web_site
.
objectIds
():
latest_web_section
=
version_web_section
.
Base_createCloneDocument
(
batch_mode
=
True
)
...
...
@@ -42,6 +46,6 @@ else:
latest_web_section
.
setAggregate
(
version_web_section
.
getAggregate
())
# Archive former versions
for
web_section
in
web_site
.
objectValues
(
portal_type
=
"Web Section"
):
if
web_section
.
getId
()
not
in
(
'latest'
,
'development'
,
'hateoas'
,
version_web_section
.
getId
()):
web_section
.
setCriterion
(
'validation_state'
,
'archived'
)
#
for web_section in web_site.objectValues(portal_type="Web Section"):
#
if web_section.getId() not in ('latest', 'development', 'hateoas', version_web_section.getId()):
#
web_section.setCriterion('validation_state', 'archived')
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/WebManifest_createCloneFile.py
View file @
8158b09e
...
...
@@ -42,6 +42,8 @@ path_list = [software_product_rurl]
print
" Processing File List
\
r
===============================
\
r
"
for
document_brain
in
document_list
:
document
=
document_brain
.
getObject
()
if
document
.
getFollowUp
():
continue
print
document
.
getId
()
new_document
=
document
.
Base_createCloneDocument
(
batch_mode
=
True
)
new_id
=
base_id
+
new_document
.
getReference
().
replace
(
'.'
,
'_'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment