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
Paul Graydon
slapos.core
Commits
83eaedd6
Commit
83eaedd6
authored
Nov 28, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow reality.
SPLs does not share root applied rule.
parent
1b3f2e35
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
11 deletions
+29
-11
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingBuilder.py
...ccounting/TestTemplateItem/testSlapOSAccountingBuilder.py
+28
-10
master/bt5/slapos_accounting/bt/revision
master/bt5/slapos_accounting/bt/revision
+1
-1
No files found.
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingBuilder.py
View file @
83eaedd6
...
...
@@ -405,16 +405,20 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
self
.
assertNotEqual
(
None
,
simulation_movement
.
getDeliveryValue
())
def
test
(
self
):
applied_rule
=
self
.
portal
.
portal_simulation
.
newContent
(
applied_rule_1
=
self
.
portal
.
portal_simulation
.
newContent
(
portal_type
=
'Applied Rule'
,
specialise
=
'portal_rules/slapos_delivery_root_simulation_rule'
)
applied_rule_2
=
self
.
portal
.
portal_simulation
.
newContent
(
portal_type
=
'Applied Rule'
,
specialise
=
'portal_rules/slapos_delivery_root_simulation_rule'
)
person
=
self
.
portal
.
person_module
.
template_member
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
simulation_movement_1
=
applied_rule
.
newContent
(
simulation_movement_1
=
applied_rule
_1
.
newContent
(
portal_type
=
'Simulation Movement'
)
simulation_movement_2
=
applied_rule
.
newContent
(
simulation_movement_2
=
applied_rule
_2
.
newContent
(
portal_type
=
'Simulation Movement'
)
...
...
@@ -739,7 +743,9 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
self
.
tic
()
self
.
portal
.
portal_deliveries
.
slapos_sale_invoice_transaction_builder
.
build
(
path
=
'%s/%%'
%
applied_rule
.
getPath
())
path
=
'%s/%%'
%
applied_rule_1
.
getPath
())
self
.
portal
.
portal_deliveries
.
slapos_sale_invoice_transaction_builder
.
build
(
path
=
'%s/%%'
%
applied_rule_2
.
getPath
())
self
.
tic
()
self
.
checkSimulationMovement
(
transaction_movement_1_rec
)
...
...
@@ -860,7 +866,9 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
transation_model_movement_1_rec_bis2
.
edit
(
delivery
=
None
,
delivery_ratio
=
1.0
)
self
.
tic
()
self
.
portal
.
portal_deliveries
.
slapos_sale_invoice_transaction_builder
.
build
(
path
=
'%s/%%'
%
applied_rule
.
getPath
())
path
=
'%s/%%'
%
applied_rule_1
.
getPath
())
self
.
portal
.
portal_deliveries
.
slapos_sale_invoice_transaction_builder
.
build
(
path
=
'%s/%%'
%
applied_rule_2
.
getPath
())
self
.
tic
()
# as invoice_1 has been updated it is time to update its causality
...
...
@@ -900,16 +908,20 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
self
.
assertNotEqual
(
None
,
simulation_movement
.
getDeliveryValue
())
def
test
(
self
):
applied_rule
=
self
.
portal
.
portal_simulation
.
newContent
(
applied_rule_1
=
self
.
portal
.
portal_simulation
.
newContent
(
portal_type
=
'Applied Rule'
,
specialise
=
'portal_rules/slapos_delivery_root_simulation_rule'
)
applied_rule_2
=
self
.
portal
.
portal_simulation
.
newContent
(
portal_type
=
'Applied Rule'
,
specialise
=
'portal_rules/slapos_delivery_root_simulation_rule'
)
person
=
self
.
portal
.
person_module
.
template_member
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
simulation_movement_1
=
applied_rule
.
newContent
(
simulation_movement_1
=
applied_rule
_1
.
newContent
(
portal_type
=
'Simulation Movement'
)
simulation_movement_2
=
applied_rule
.
newContent
(
simulation_movement_2
=
applied_rule
_2
.
newContent
(
portal_type
=
'Simulation Movement'
)
...
...
@@ -1067,7 +1079,10 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
self
.
portal
.
portal_deliveries
\
.
slapos_sale_invoice_transaction_trade_model_builder
.
build
(
path
=
'%s/%%'
%
applied_rule
.
getPath
())
path
=
'%s/%%'
%
applied_rule_1
.
getPath
())
self
.
portal
.
portal_deliveries
\
.
slapos_sale_invoice_transaction_trade_model_builder
.
build
(
path
=
'%s/%%'
%
applied_rule_2
.
getPath
())
self
.
tic
()
self
.
checkSimulationMovement
(
model_movement_1_tax
)
...
...
@@ -1126,7 +1141,10 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
self
.
tic
()
self
.
portal
.
portal_deliveries
\
.
slapos_sale_invoice_transaction_trade_model_builder
.
build
(
path
=
'%s/%%'
%
applied_rule
.
getPath
())
path
=
'%s/%%'
%
applied_rule_1
.
getPath
())
self
.
portal
.
portal_deliveries
\
.
slapos_sale_invoice_transaction_trade_model_builder
.
build
(
path
=
'%s/%%'
%
applied_rule_1
.
getPath
())
self
.
tic
()
# as invoice_1 has been updated it is time to update its causality
...
...
master/bt5/slapos_accounting/bt/revision
View file @
83eaedd6
163
\ No newline at end of file
164
\ 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