Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos.core
Commits
fc94ba08
Commit
fc94ba08
authored
Nov 08, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_panel: use Allocation Supply to return the list of Software Product
parent
af61be0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_getProductList.py
...eItem/portal_skins/slapos_panel/Project_getProductList.py
+16
-4
No files found.
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_getProductList.py
View file @
fc94ba08
from
Products.CMFCore.utils
import
getToolByName
project
=
context
portal
=
project
.
getPortalObject
()
domain_tool
=
getToolByName
(
portal
,
'portal_domains'
)
software_product_list
=
portal
.
portal_catalog
(
portal_type
=
'Software Product'
,
follow_up__uid
=
context
.
getUid
(),
validation_state
=
[
'validated'
,
'published'
]
tmp_context
=
portal
.
portal_trash
.
newContent
(
portal_type
=
'Movement'
,
temp_object
=
1
,
#resource_value=software_product,
#software_type_value=type_variation,
#software_release_value=release_variation,
destination_value
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
(),
destination_project_value
=
project
,
start_date
=
DateTime
()
)
software_product_list
=
list
(
set
([
x
.
getObject
().
getParentValue
().
getResourceValue
()
for
x
in
\
domain_tool
.
searchPredicateList
(
tmp_context
,
portal_type
=
[
'Allocation Supply Cell'
],
tested_base_category_list
=
[
'destination_project'
,
'destination'
])]))
if
project
.
getDestinationSection
(
None
)
is
None
:
# User virtual master
# No need to pay anything for the instance
...
...
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