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
eadb4b9d
Commit
eadb4b9d
authored
Mar 31, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: XXX consumption price must be set to 0
XXX migrate existing packing list
parent
0e02a9b2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
10 deletions
+4
-10
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/OrderBuilder_generateSlapOSAggregatedMovementList.py
...ting/OrderBuilder_generateSlapOSAggregatedMovementList.py
+1
-8
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_consumption/ComputerConsumptionTioXMLFile_solveInvoicingGeneration.py
...ComputerConsumptionTioXMLFile_solveInvoicingGeneration.py
+1
-2
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSConsumptionSkins.py
...portal_components/test.erp5.testSlapOSConsumptionSkins.py
+2
-0
No files found.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/OrderBuilder_generateSlapOSAggregatedMovementList.py
View file @
eadb4b9d
...
@@ -72,16 +72,9 @@ for movement in movement_list:
...
@@ -72,16 +72,9 @@ for movement in movement_list:
specialise
=
specialise
,
specialise
=
specialise
,
price_currency
=
movement
.
getPriceCurrency
(),
price_currency
=
movement
.
getPriceCurrency
(),
start_date
=
movement
.
getStartDate
(),
start_date
=
movement
.
getStartDate
(),
price
=
movement
.
getPrice
(
0.0
),
)
)
# XXX Shamefully hardcoded values
if
movement
.
getResource
()
in
(
'service_module/slapos_instance_subscription'
,
'service_module/slapos_reservation_refund'
):
temp_movement
.
edit
(
price
=
movement
.
getPrice
(
0.0
))
else
:
temp_movement
.
edit
(
price
=
0.0
)
instance_tree
=
movement
.
getAggregateValue
(
portal_type
=
"Instance Tree"
)
instance_tree
=
movement
.
getAggregateValue
(
portal_type
=
"Instance Tree"
)
if
movement
.
getSpecialiseUid
()
in
consumption_specialise_uid_list
:
if
movement
.
getSpecialiseUid
()
in
consumption_specialise_uid_list
:
...
...
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_consumption/ComputerConsumptionTioXMLFile_solveInvoicingGeneration.py
View file @
eadb4b9d
...
@@ -9,8 +9,6 @@ result = []
...
@@ -9,8 +9,6 @@ result = []
if
context
.
getValidationState
()
in
[
"cancelled"
,
"shared"
]:
if
context
.
getValidationState
()
in
[
"cancelled"
,
"shared"
]:
return
return
raise
NotImplementedError
(
'Disable'
)
try
:
try
:
tioxml_dict
=
document
.
ComputerConsumptionTioXMLFile_parseXml
()
tioxml_dict
=
document
.
ComputerConsumptionTioXMLFile_parseXml
()
except
KeyError
:
except
KeyError
:
...
@@ -113,6 +111,7 @@ else:
...
@@ -113,6 +111,7 @@ else:
destination_project
=
project
,
destination_project
=
project
,
resource_value
=
service
,
resource_value
=
service
,
quantity_unit
=
service
.
getQuantityUnit
(),
quantity_unit
=
service
.
getQuantityUnit
(),
price
=
0
,
)
)
delivery
.
confirm
(
comment
=
"Created from %s"
%
context
.
getRelativeUrl
())
delivery
.
confirm
(
comment
=
"Created from %s"
%
context
.
getRelativeUrl
())
delivery
.
start
()
delivery
.
start
()
...
...
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSConsumptionSkins.py
View file @
eadb4b9d
...
@@ -378,6 +378,7 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration(
...
@@ -378,6 +378,7 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration(
self
.
assertEqual
(
line
.
getTitle
(),
"fooà"
)
self
.
assertEqual
(
line
.
getTitle
(),
"fooà"
)
self
.
assertEqual
(
line
.
getQuantity
(),
42.42
)
self
.
assertEqual
(
line
.
getQuantity
(),
42.42
)
self
.
assertEqual
(
line
.
getPrice
(),
0
)
self
.
assertEqual
(
line
.
getAggregateList
(),
[
self
.
assertEqual
(
line
.
getAggregateList
(),
[
self
.
compute_node
.
partition1
.
getRelativeUrl
(),
self
.
compute_node
.
partition1
.
getRelativeUrl
(),
self
.
start_requested_software_instance
.
getRelativeUrl
(),
self
.
start_requested_software_instance
.
getRelativeUrl
(),
...
@@ -434,6 +435,7 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration(
...
@@ -434,6 +435,7 @@ class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration(
self
.
assertEqual
(
line
.
getTitle
(),
"fooà"
)
self
.
assertEqual
(
line
.
getTitle
(),
"fooà"
)
self
.
assertEqual
(
line
.
getQuantity
(),
42.42
)
self
.
assertEqual
(
line
.
getQuantity
(),
42.42
)
self
.
assertEqual
(
line
.
getPrice
(),
0
)
self
.
assertEqual
(
line
.
getAggregateList
(),
[
self
.
assertEqual
(
line
.
getAggregateList
(),
[
self
.
compute_node
.
partition2
.
getRelativeUrl
(),
self
.
compute_node
.
partition2
.
getRelativeUrl
(),
self
.
stop_requested_software_instance
.
getRelativeUrl
(),
self
.
stop_requested_software_instance
.
getRelativeUrl
(),
...
...
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