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
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Rafael Monnerat
slapos.core
Commits
c5517a7d
Commit
c5517a7d
authored
Mar 07, 2025
by
Rafael Monnerat
👻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: Use price from service (via Sale Packing List)
parent
b7fdffdc
Pipeline
#40226
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_consumption/ComputerConsumptionTioXMLFile_solveInvoicingGeneration.py
...ComputerConsumptionTioXMLFile_solveInvoicingGeneration.py
+5
-7
No files found.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_consumption/ComputerConsumptionTioXMLFile_solveInvoicingGeneration.py
View file @
c5517a7d
...
...
@@ -112,7 +112,6 @@ for movement_entry in six.itervalues(movement_dict):
# start_date?
# stop_date?
# Missing specialise?
# specialise_value...
# For reference use the values of the subscription request, can they vary?
specialise_value
=
subscription_request
.
getSpecialiseValue
(),
source_value
=
subscription_request
.
getSourceValue
(),
...
...
@@ -123,7 +122,7 @@ for movement_entry in six.itervalues(movement_dict):
destination_section_value
=
subscription_request
.
getDestinationSectionValue
(),
destination_decision_value
=
subscription_request
.
getDestinationDecisionValue
(),
destination_project_value
=
subscription_request
.
getDestinationProjectValue
(),
ledger_value
=
portal
.
portal_categories
.
ledger
.
automated
,
ledger_value
=
subscription_request
.
getLedgerValue
()
,
causality_value
=
document
,
## Should be like this?
start_date
=
document
.
getCreationDate
(),
price_currency_value
=
subscription_request
.
getPriceCurrencyValue
(),
...
...
@@ -131,18 +130,17 @@ for movement_entry in six.itervalues(movement_dict):
for
movement
in
movement_entry
:
service
=
portal
.
restrictedTraverse
(
movement
[
'resource'
])
sale_packing_list
.
newContent
(
line
=
sale_packing_list
.
newContent
(
portal_type
=
"Sale Packing List Line"
,
title
=
movement
[
'title'
],
quantity
=
movement
[
'quantity'
],
aggregate_value_list
=
movement
[
'aggregate_value_list'
],
resource_value
=
service
,
quantity_unit
=
service
.
getQuantityUnit
(),
# use ?
# base_contribution ?
# Pricing calculation is done for on Resource_createSubscriptionRequest
price
=
10
,
# I should calculate price here.
base_contribution_list
=
service
.
getBaseContributionList
(),
use
=
service
.
getUse
()
)
assert
line
.
getPrice
(),
line
.
getPrice
()
sale_packing_list
.
Delivery_fixBaseContributionTaxableRate
()
sale_packing_list
.
Base_checkConsistency
()
sale_packing_list
.
confirm
(
comment
=
"Created from %s"
%
document
.
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