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
ac7c11e4
Commit
ac7c11e4
authored
Oct 03, 2022
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: select the correct software release/type on open order
parent
69c9bcb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/InstanceTree_requestUpdateOpenSaleOrder.py
...pos_accounting/InstanceTree_requestUpdateOpenSaleOrder.py
+15
-3
No files found.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/InstanceTree_requestUpdateOpenSaleOrder.py
View file @
ac7c11e4
...
...
@@ -90,11 +90,23 @@ if instance_tree.getCausalityState() == 'diverged':
raise
NotImplementedError
(
'No Software Product defined for %s'
%
instance_tree
.
getRelativeUrl
())
#assert instance_tree.getPortalType() in service.getRequiredAggregatedPortalTypeList()
software_release
=
portal
.
portal_catalog
.
getResultValue
(
parent_uid
=
service
.
getUid
(),
url_string
=
instance_tree
.
getUrlString
(),
portal_type
=
"Software Product Release Variation"
)
software_type
=
portal
.
portal_catalog
.
getResultValue
(
parent_uid
=
service
.
getUid
(),
title
=
instance_tree
.
getSourceReference
(),
portal_type
=
"Software Product Type Variation"
)
resource_vcl
=
list
(
service
.
getVariationCategoryList
(
omit_individual_variation
=
0
))
resource_vcl
=
[
'software_release/%s'
%
software_release
.
getRelativeUrl
(),
'software_type/%s'
%
software_type
.
getRelativeUrl
()
]
resource_vcl
.
sort
()
assert
len
(
resource_vcl
)
!=
0
,
service
assert
len
(
resource_vcl
)
==
2
,
service
edit_kw
=
{
'resource_value'
:
service
,
...
...
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