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
676486db
Commit
676486db
authored
Nov 14, 2022
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_panel: drop unused script
parent
ecdf4c5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
112 deletions
+0
-112
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_getProductList.py
...eItem/portal_skins/slapos_panel/Project_getProductList.py
+0
-50
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_getProductList.xml
...Item/portal_skins/slapos_panel/Project_getProductList.xml
+0
-62
No files found.
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_getProductList.py
deleted
100644 → 0
View file @
ecdf4c5c
from
Products.CMFCore.utils
import
getToolByName
project
=
context
portal
=
project
.
getPortalObject
()
domain_tool
=
getToolByName
(
portal
,
'portal_domains'
)
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
# XXX filter by Allocation Supply
return
software_product_list
result_list
=
[]
for
software_product
in
software_product_list
:
# XXX be careful not acquiring categories from parent
movement
=
project
.
getParentValue
().
newContent
(
#portal_type='Open Sale Order Line',
portal_type
=
'Sale Order Line'
,
temp_object
=
True
,
id
=
project
.
getId
(),
uid
=
project
.
getUid
(),
quantity
=
1
,
#source=project.getSource(),
#source_section=project.getSourceSection(),
#destination=project.getDestination(),
#destination_section=project.getDestinationSection(),
#destination_project_value=project,
resource_value
=
software_product
,
)
if
movement
.
getPrice
()
is
not
None
:
result_list
.
append
(
movement
)
movement
.
setTitle
(
'%s %s'
%
(
software_product
.
getTitle
(),
movement
.
getPrice
()))
return
result_list
#return [x.asContext(title='%s %s' % (x.getTitle(), x.getPrice())) for x in software_product_list if x.getPrice(None) is not None]
master/bt5/slapos_panel/SkinTemplateItem/portal_skins/slapos_panel/Project_getProductList.xml
deleted
100644 → 0
View file @
ecdf4c5c
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Project_getProductList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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