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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
erp5
Commits
ce6223bc
Commit
ce6223bc
authored
Jun 14, 2018
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_officejs_appstore_base] Add tag for publication creation activities
/reviewed-on
nexedi/erp5!689
parent
6c8accf3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/ERP5Site_createNewSoftwarePublication.py
...js_appstore_base/ERP5Site_createNewSoftwarePublication.py
+7
-1
No files found.
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/ERP5Site_createNewSoftwarePublication.py
View file @
ce6223bc
...
@@ -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
}
)
)
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