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
b929ad39
Commit
b929ad39
authored
Oct 18, 2022
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: InstanceTree_getSoftwareProduct also return release and type variations
parent
965e721c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
15 deletions
+1
-15
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/InstanceTree_requestUpdateOpenSaleOrder.py
...pos_accounting/InstanceTree_requestUpdateOpenSaleOrder.py
+1
-15
No files found.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/InstanceTree_requestUpdateOpenSaleOrder.py
View file @
b929ad39
...
...
@@ -168,27 +168,13 @@ if instance_tree.getCausalityState() == 'diverged':
start_date
=
hosting_subscription
.
HostingSubscription_calculateSubscriptionStartDate
()
# Search for matching resource
service
=
instance_tree
.
InstanceTree_getSoftwareProduct
()
service
,
software_release
,
software_type
=
instance_tree
.
InstanceTree_getSoftwareProduct
()
if
(
service
is
None
)
or
(
service
.
getUse
()
!=
'trade/sale'
):
# XXX Add comment on instance tree
return
#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"
)
if
software_type
is
None
:
# XXX add comment on instance tree
return
# Sale Supply price do not match Open Order
# Create a temp Sale Order to calculate the real price
...
...
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