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
19
Merge Requests
19
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
nexedi
slapos.core
Commits
2de95d6f
Commit
2de95d6f
authored
Nov 28, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow up
eac76ae4
hosting_subscription is not needed.
parent
eac76ae4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
19 deletions
+1
-19
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingBuilder.py
...ccounting/TestTemplateItem/testSlapOSAccountingBuilder.py
+0
-18
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 @
2de95d6f
...
@@ -147,18 +147,14 @@ class TestSlapOSSalePackingListBuilder(testSlapOSMixin):
...
@@ -147,18 +147,14 @@ class TestSlapOSSalePackingListBuilder(testSlapOSMixin):
class
TestSlapOSSaleInvoiceBuilder
(
TestSlapOSSalePackingListBuilder
):
class
TestSlapOSSaleInvoiceBuilder
(
TestSlapOSSalePackingListBuilder
):
def
test
(
self
):
def
test
(
self
):
hosting_subscription
=
self
.
portal
.
hosting_subscription_module
\
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
applied_rule
=
self
.
portal
.
portal_simulation
.
newContent
(
applied_rule
=
self
.
portal
.
portal_simulation
.
newContent
(
portal_type
=
'Applied Rule'
,
portal_type
=
'Applied Rule'
,
causality
=
hosting_subscription
.
getRelativeUrl
(),
specialise
=
'portal_rules/slapos_delivery_root_simulation_rule'
specialise
=
'portal_rules/slapos_delivery_root_simulation_rule'
)
)
person
=
self
.
portal
.
person_module
.
template_member
\
person
=
self
.
portal
.
person_module
.
template_member
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
.
Base_createCloneDocument
(
batch_mode
=
1
)
delivery_kw
=
dict
(
delivery_kw
=
dict
(
portal_type
=
'Sale Packing List'
,
portal_type
=
'Sale Packing List'
,
causality
=
hosting_subscription
.
getRelativeUrl
(),
price_currency
=
'currency_module/EUR'
,
price_currency
=
'currency_module/EUR'
,
source
=
'organisation_module/slapos'
,
source
=
'organisation_module/slapos'
,
source_section
=
'organisation_module/slapos'
,
source_section
=
'organisation_module/slapos'
,
...
@@ -171,7 +167,6 @@ class TestSlapOSSaleInvoiceBuilder(TestSlapOSSalePackingListBuilder):
...
@@ -171,7 +167,6 @@ class TestSlapOSSaleInvoiceBuilder(TestSlapOSSalePackingListBuilder):
quantity_unit
=
'unit/piece'
,
quantity_unit
=
'unit/piece'
,
base_contribution_list
=
[
'base_amount/invoicing/discounted'
,
base_contribution_list
=
[
'base_amount/invoicing/discounted'
,
'base_amount/invoicing/taxable'
],
'base_amount/invoicing/taxable'
],
aggregate
=
hosting_subscription
.
getRelativeUrl
(),
)
)
delivery_1
=
self
.
portal
.
sale_packing_list_module
.
newContent
(
delivery_1
=
self
.
portal
.
sale_packing_list_module
.
newContent
(
destination
=
person
.
getRelativeUrl
(),
destination
=
person
.
getRelativeUrl
(),
...
@@ -205,7 +200,6 @@ class TestSlapOSSaleInvoiceBuilder(TestSlapOSSalePackingListBuilder):
...
@@ -205,7 +200,6 @@ class TestSlapOSSaleInvoiceBuilder(TestSlapOSSalePackingListBuilder):
)
)
simulation_movement_kw
=
dict
(
simulation_movement_kw
=
dict
(
portal_type
=
'Simulation Movement'
,
portal_type
=
'Simulation Movement'
,
aggregate
=
hosting_subscription
.
getRelativeUrl
(),
base_contribution
=
[
'base_amount/invoicing/discounted'
,
base_contribution
=
[
'base_amount/invoicing/discounted'
,
'base_amount/invoicing/taxable'
],
'base_amount/invoicing/taxable'
],
causality
=
[
'business_process_module/slapos_aggregated_business_process'
causality
=
[
'business_process_module/slapos_aggregated_business_process'
...
@@ -320,11 +314,8 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
...
@@ -320,11 +314,8 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
self
.
assertNotEqual
(
None
,
simulation_movement
.
getDeliveryValue
())
self
.
assertNotEqual
(
None
,
simulation_movement
.
getDeliveryValue
())
def
test
(
self
):
def
test
(
self
):
hosting_subscription
=
self
.
portal
.
hosting_subscription_module
\
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
applied_rule
=
self
.
portal
.
portal_simulation
.
newContent
(
applied_rule
=
self
.
portal
.
portal_simulation
.
newContent
(
portal_type
=
'Applied Rule'
,
portal_type
=
'Applied Rule'
,
causality
=
hosting_subscription
.
getRelativeUrl
(),
specialise
=
'portal_rules/slapos_delivery_root_simulation_rule'
specialise
=
'portal_rules/slapos_delivery_root_simulation_rule'
)
)
person
=
self
.
portal
.
person_module
.
template_member
\
person
=
self
.
portal
.
person_module
.
template_member
\
...
@@ -370,7 +361,6 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
...
@@ -370,7 +361,6 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
**
invoice_kw
**
invoice_kw
)
)
invoice_line_1
=
invoice_1
.
newContent
(
invoice_line_1
=
invoice_1
.
newContent
(
aggregate
=
hosting_subscription
.
getRelativeUrl
(),
price
=
1.2
,
price
=
1.2
,
quantity
=
3.4
,
quantity
=
3.4
,
**
invoice_line_kw
**
invoice_line_kw
...
@@ -389,7 +379,6 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
...
@@ -389,7 +379,6 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
**
invoice_kw
**
invoice_kw
)
)
invoice_line_2
=
invoice_2
.
newContent
(
invoice_line_2
=
invoice_2
.
newContent
(
aggregate
=
hosting_subscription
.
getRelativeUrl
(),
price
=
5.6
,
price
=
5.6
,
quantity
=
7.8
,
quantity
=
7.8
,
**
invoice_line_kw
**
invoice_line_kw
...
@@ -414,7 +403,6 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
...
@@ -414,7 +403,6 @@ class TestSlapOSSaleInvoiceTransactionBuilder(TestSlapOSSalePackingListBuilder):
delivery_ratio
=
1.0
,
delivery_ratio
=
1.0
,
delivery_error
=
0.0
,
delivery_error
=
0.0
,
portal_type
=
'Simulation Movement'
,
portal_type
=
'Simulation Movement'
,
aggregate
=
hosting_subscription
.
getRelativeUrl
(),
base_contribution
=
[
'base_amount/invoicing/discounted'
,
base_contribution
=
[
'base_amount/invoicing/discounted'
,
'base_amount/invoicing/taxable'
],
'base_amount/invoicing/taxable'
],
destination
=
person
.
getRelativeUrl
(),
destination
=
person
.
getRelativeUrl
(),
...
@@ -821,11 +809,8 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
...
@@ -821,11 +809,8 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
self
.
assertNotEqual
(
None
,
simulation_movement
.
getDeliveryValue
())
self
.
assertNotEqual
(
None
,
simulation_movement
.
getDeliveryValue
())
def
test
(
self
):
def
test
(
self
):
hosting_subscription
=
self
.
portal
.
hosting_subscription_module
\
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
applied_rule
=
self
.
portal
.
portal_simulation
.
newContent
(
applied_rule
=
self
.
portal
.
portal_simulation
.
newContent
(
portal_type
=
'Applied Rule'
,
portal_type
=
'Applied Rule'
,
causality
=
hosting_subscription
.
getRelativeUrl
(),
specialise
=
'portal_rules/slapos_delivery_root_simulation_rule'
specialise
=
'portal_rules/slapos_delivery_root_simulation_rule'
)
)
person
=
self
.
portal
.
person_module
.
template_member
\
person
=
self
.
portal
.
person_module
.
template_member
\
...
@@ -865,7 +850,6 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
...
@@ -865,7 +850,6 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
**
invoice_kw
**
invoice_kw
)
)
invoice_line_1
=
invoice_1
.
newContent
(
invoice_line_1
=
invoice_1
.
newContent
(
aggregate
=
hosting_subscription
.
getRelativeUrl
(),
price
=
1.2
,
price
=
1.2
,
quantity
=
3.4
,
quantity
=
3.4
,
**
invoice_line_kw
**
invoice_line_kw
...
@@ -879,7 +863,6 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
...
@@ -879,7 +863,6 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
**
invoice_kw
**
invoice_kw
)
)
invoice_line_2
=
invoice_2
.
newContent
(
invoice_line_2
=
invoice_2
.
newContent
(
aggregate
=
hosting_subscription
.
getRelativeUrl
(),
price
=
5.6
,
price
=
5.6
,
quantity
=
7.8
,
quantity
=
7.8
,
**
invoice_line_kw
**
invoice_line_kw
...
@@ -899,7 +882,6 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
...
@@ -899,7 +882,6 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
delivery_ratio
=
1.0
,
delivery_ratio
=
1.0
,
delivery_error
=
0.0
,
delivery_error
=
0.0
,
portal_type
=
'Simulation Movement'
,
portal_type
=
'Simulation Movement'
,
aggregate
=
hosting_subscription
.
getRelativeUrl
(),
base_contribution
=
[
'base_amount/invoicing/discounted'
,
base_contribution
=
[
'base_amount/invoicing/discounted'
,
'base_amount/invoicing/taxable'
],
'base_amount/invoicing/taxable'
],
destination
=
person
.
getRelativeUrl
(),
destination
=
person
.
getRelativeUrl
(),
...
...
master/bt5/slapos_accounting/bt/revision
View file @
2de95d6f
158
159
\ 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