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
853c3200
Commit
853c3200
authored
Feb 13, 2024
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: Entity_getOutstandingAmountList parameters default value changed
parent
3e76725a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
18 deletions
+16
-18
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5AccountingScenario.py
..._components/test.erp5.testSlapOSERP5AccountingScenario.py
+16
-18
No files found.
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5AccountingScenario.py
View file @
853c3200
...
...
@@ -97,8 +97,8 @@ class TestSlapOSAccountingScenario(TestSlapOSVirtualMasterScenarioMixin):
# 1 subscription requests
self
.
assertRelatedObjectCount
(
project
,
5
)
self
.
assertFalse
(
owner_person
.
Entity_hasOutstandingAmount
(
include_planned
=
True
))
self
.
assertFalse
(
owner_person
.
Entity_hasOutstandingAmount
())
self
.
assertFalse
(
owner_person
.
Entity_hasOutstandingAmount
(
include_planned
=
False
))
self
.
assertEqual
(
project
.
getValidationState
(),
"validated"
)
subscription_request
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
"Subscription Request"
,
...
...
@@ -111,11 +111,11 @@ class TestSlapOSAccountingScenario(TestSlapOSVirtualMasterScenarioMixin):
payment_transaction
.
PaymentTransaction_acceptDepositPayment
()
self
.
tic
()
self
.
assertTrue
(
owner_person
.
Entity_hasOutstandingAmount
())
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
()
self
.
assertTrue
(
owner_person
.
Entity_hasOutstandingAmount
(
include_planned
=
True
))
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
(
include_planned
=
True
)
self
.
assertEquals
(
len
(
amount_list
),
1
)
self
.
assertEquals
(
amount_list
[
0
].
total_price
,
24.384
)
self
.
assertFalse
(
owner_person
.
Entity_hasOutstandingAmount
(
include_planned
=
False
))
self
.
assertFalse
(
owner_person
.
Entity_hasOutstandingAmount
())
self
.
assertEqual
(
subscription_request
.
getSimulationState
(),
"invalidated"
)
open_sale_order
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
"Open Sale Order Line"
,
...
...
@@ -151,12 +151,12 @@ class TestSlapOSAccountingScenario(TestSlapOSVirtualMasterScenarioMixin):
self
.
portal
.
portal_alarms
.
update_open_order_simulation
.
activeSense
()
self
.
tic
()
self
.
assertTrue
(
owner_person
.
Entity_hasOutstandingAmount
())
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
()
self
.
assertTrue
(
owner_person
.
Entity_hasOutstandingAmount
(
include_planned
=
True
))
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
(
include_planned
=
True
)
self
.
assertEquals
(
len
(
amount_list
),
1
)
self
.
assertEquals
(
amount_list
[
0
].
total_price
,
175.584
)
self
.
assertTrue
(
owner_person
.
Entity_hasOutstandingAmount
(
include_planned
=
False
))
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
(
include_planned
=
False
)
self
.
assertTrue
(
owner_person
.
Entity_hasOutstandingAmount
())
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
()
self
.
assertEquals
(
len
(
amount_list
),
1
)
self
.
assertEquals
(
amount_list
[
0
].
total_price
,
125.184
)
self
.
assertEqual
(
first_invoice
.
getSimulationState
(),
"stopped"
)
...
...
@@ -175,7 +175,6 @@ class TestSlapOSAccountingScenario(TestSlapOSVirtualMasterScenarioMixin):
payment_transaction
=
owner_person
.
Entity_createPaymentTransaction
(
owner_person
.
Entity_getOutstandingAmountList
(
include_planned
=
False
,
at_date
=
DateTime
(
'2021/05/06'
),
section_uid
=
first_invoice
.
getSourceSectionUid
(),
resource_uid
=
first_invoice
.
getPriceCurrencyUid
(),
...
...
@@ -186,12 +185,12 @@ class TestSlapOSAccountingScenario(TestSlapOSVirtualMasterScenarioMixin):
payment_transaction
.
stop
()
self
.
assertEquals
(
payment_transaction
.
AccountingTransaction_getTotalCredit
(),
74.78399999999999
)
self
.
tic
()
self
.
assertTrue
(
owner_person
.
Entity_hasOutstandingAmount
())
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
()
self
.
assertTrue
(
owner_person
.
Entity_hasOutstandingAmount
(
include_planned
=
True
))
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
(
include_planned
=
True
)
self
.
assertEquals
(
len
(
amount_list
),
1
)
self
.
assertEquals
(
amount_list
[
0
].
total_price
,
100.8
)
self
.
assertTrue
(
owner_person
.
Entity_hasOutstandingAmount
(
include_planned
=
False
))
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
(
include_planned
=
False
)
self
.
assertTrue
(
owner_person
.
Entity_hasOutstandingAmount
())
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
()
self
.
assertEquals
(
len
(
amount_list
),
1
)
self
.
assertEquals
(
amount_list
[
0
].
total_price
,
50.4
)
self
.
assertTrue
(
first_invoice
.
SaleInvoiceTransaction_isLettered
())
...
...
@@ -203,7 +202,6 @@ class TestSlapOSAccountingScenario(TestSlapOSVirtualMasterScenarioMixin):
payment_transaction
=
owner_person
.
Entity_createPaymentTransaction
(
owner_person
.
Entity_getOutstandingAmountList
(
include_planned
=
False
,
section_uid
=
first_invoice
.
getSourceSectionUid
(),
resource_uid
=
first_invoice
.
getPriceCurrencyUid
(),
ledger_uid
=
first_invoice
.
getLedgerUid
(),
...
...
@@ -213,12 +211,12 @@ class TestSlapOSAccountingScenario(TestSlapOSVirtualMasterScenarioMixin):
payment_transaction
.
stop
()
self
.
assertEquals
(
payment_transaction
.
AccountingTransaction_getTotalCredit
(),
50.4
)
self
.
tic
()
self
.
assertTrue
(
owner_person
.
Entity_hasOutstandingAmount
())
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
()
self
.
assertTrue
(
owner_person
.
Entity_hasOutstandingAmount
(
include_planned
=
True
))
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
(
include_planned
=
True
)
self
.
assertEquals
(
len
(
amount_list
),
1
)
self
.
assertEquals
(
amount_list
[
0
].
total_price
,
50.4
)
self
.
assertFalse
(
owner_person
.
Entity_hasOutstandingAmount
(
include_planned
=
False
))
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
(
include_planned
=
False
)
self
.
assertFalse
(
owner_person
.
Entity_hasOutstandingAmount
())
amount_list
=
owner_person
.
Entity_getOutstandingAmountList
()
self
.
assertEquals
(
len
(
amount_list
),
0
)
# Ensure no unexpected object has been created
self
.
assertRelatedObjectCount
(
project
,
22
)
...
...
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