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
0
Merge Requests
0
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
Carlos Ramos Carreño
slapos.core
Commits
b4cfe3fb
Commit
b4cfe3fb
authored
Nov 28, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
default_payment_rule is dropped.
parent
ebe67cb2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
53 deletions
+3
-53
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingRule.py
...s_accounting/TestTemplateItem/testSlapOSAccountingRule.py
+2
-52
master/bt5/slapos_accounting/bt/revision
master/bt5/slapos_accounting/bt/revision
+1
-1
No files found.
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingRule.py
View file @
b4cfe3fb
...
@@ -151,7 +151,7 @@ class TestDefaultInvoiceTransactionRule(testSlapOSMixin):
...
@@ -151,7 +151,7 @@ class TestDefaultInvoiceTransactionRule(testSlapOSMixin):
SimulationMovement
.
getSimulationState
=
getSimulationStateDelivered
SimulationMovement
.
getSimulationState
=
getSimulationStateDelivered
root_simulation_movement
.
expand
(
expand_policy
=
'immediate'
)
root_simulation_movement
.
expand
(
expand_policy
=
'immediate'
)
checkSimulationMovement
(
debit_movement
,
'account_module/receivable'
,
checkSimulationMovement
(
debit_movement
,
'account_module/receivable'
,
'account_module/payable'
,
-
1
,
'delivered'
,
[
'default_payment_rule'
])
'account_module/payable'
,
-
1
,
'delivered'
,
[])
checkSimulationMovement
(
credit_movement
,
'account_module/sales'
,
checkSimulationMovement
(
credit_movement
,
'account_module/sales'
,
'account_module/purchase'
,
1
,
'delivered'
,
[])
'account_module/purchase'
,
1
,
'delivered'
,
[])
finally
:
finally
:
...
@@ -338,57 +338,7 @@ class TestDefaultPaymentRule(testSlapOSMixin):
...
@@ -338,57 +338,7 @@ class TestDefaultPaymentRule(testSlapOSMixin):
root_simulation_movement
.
expand
(
expand_policy
=
'immediate'
)
root_simulation_movement
.
expand
(
expand_policy
=
'immediate'
)
applied_rule_list
=
root_simulation_movement
.
contentValues
(
applied_rule_list
=
root_simulation_movement
.
contentValues
(
portal_type
=
'Applied Rule'
)
portal_type
=
'Applied Rule'
)
self
.
assertEqual
(
1
,
len
(
applied_rule_list
))
self
.
assertEqual
(
0
,
len
(
applied_rule_list
))
applied_rule
=
applied_rule_list
[
0
]
self
.
assertEqual
(
'default_payment_rule'
,
applied_rule
.
getSpecialiseReference
())
simulation_movement_list
=
applied_rule
.
contentValues
(
portal_type
=
'Simulation Movement'
)
self
.
assertEqual
(
2
,
len
(
simulation_movement_list
))
debit_movement_list
=
[
q
for
q
in
simulation_movement_list
if
\
q
.
getCausality
()
==
'business_process_module/slapos_aggregated_business_process/payment_debit_path'
]
credit_movement_list
=
[
q
for
q
in
simulation_movement_list
if
\
q
.
getCausality
()
==
'business_process_module/slapos_aggregated_business_process/payment_credit_path'
]
self
.
assertEqual
(
1
,
len
(
debit_movement_list
))
self
.
assertEqual
(
1
,
len
(
credit_movement_list
))
debit_movement
=
debit_movement_list
[
0
]
credit_movement
=
credit_movement_list
[
0
]
def
checkSimulationMovement
(
simulation_movement
,
source
,
destination
,
quantity_sign
,
child_rule_reference_list
):
self
.
assertEqual
(
'planned'
,
simulation_movement
.
getSimulationState
())
self
.
assertEqual
(
source
,
simulation_movement
.
getSource
())
self
.
assertEqual
(
root_simulation_movement
.
getSourceSection
(),
simulation_movement
.
getSourceSection
())
self
.
assertEqual
(
destination
,
simulation_movement
.
getDestination
())
self
.
assertEqual
(
root_simulation_movement
.
getDestinationSection
(),
simulation_movement
.
getDestinationSection
())
self
.
assertEqual
(
1
,
simulation_movement
.
getPrice
())
self
.
assertEqual
(
root_simulation_movement
.
getTotalPrice
()
*
\
quantity_sign
,
simulation_movement
.
getQuantity
())
self
.
assertEqual
(
root_simulation_movement
.
getResource
(),
simulation_movement
.
getResource
())
self
.
assertEqual
([],
simulation_movement
.
getAggregateList
())
self
.
assertEqual
(
root_simulation_movement
.
getStartDate
(),
simulation_movement
.
getStartDate
())
self
.
assertEqual
(
root_simulation_movement
.
getStopDate
(),
simulation_movement
.
getStopDate
())
self
.
assertEqual
([],
simulation_movement
.
getBaseContributionList
())
self
.
assertEqual
(
None
,
simulation_movement
.
getPriceCurrency
())
self
.
assertEqual
(
None
,
simulation_movement
.
getUse
())
self
.
assertEqual
(
'slapos/payment'
,
simulation_movement
.
getTradePhase
())
self
.
assertEqual
(
root_simulation_movement
.
getQuantityUnit
(),
simulation_movement
.
getQuantityUnit
())
self
.
assertEqual
(
root_simulation_movement
.
getSpecialise
(),
simulation_movement
.
getSpecialise
())
self
.
assertEqual
(
0
,
len
(
simulation_movement
.
contentValues
(
portal_type
=
'Applied Rule'
)))
checkSimulationMovement
(
debit_movement
,
'account_module/bank'
,
'account_module/bank'
,
1
,
[
'default_payment_rule'
])
checkSimulationMovement
(
credit_movement
,
'account_module/receivable'
,
'account_module/payable'
,
-
1
,
[])
finally
:
finally
:
SimulationMovement
.
getSimulationState
=
SimulationMovement
\
SimulationMovement
.
getSimulationState
=
SimulationMovement
\
.
original_getSimulationState
.
original_getSimulationState
...
...
master/bt5/slapos_accounting/bt/revision
View file @
b4cfe3fb
151
152
\ No newline at end of file
\ No newline at end of file
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