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
d6804d55
Commit
d6804d55
authored
Aug 03, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: test: use valid trade condition to generate the simulation
parent
127ca24f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSAccountingSkins.py
.../portal_components/test.erp5.testSlapOSAccountingSkins.py
+10
-3
No files found.
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSAccountingSkins.py
View file @
d6804d55
...
@@ -159,11 +159,19 @@ class TestSlapOSAccounting(SlapOSTestCaseMixin):
...
@@ -159,11 +159,19 @@ class TestSlapOSAccounting(SlapOSTestCaseMixin):
project
=
self
.
addProject
()
project
=
self
.
addProject
()
person
=
self
.
makePerson
(
project
,
user
=
1
)
person
=
self
.
makePerson
(
project
,
user
=
1
)
sale_trade_condition
=
self
.
portal
.
sale_trade_condition_module
.
newContent
(
portal_type
=
"Sale Trade Condition"
,
reference
=
self
.
generateNewId
(),
specialise
=
"business_process_module/slapos_ultimate_business_process"
)
sale_trade_condition
.
validate
()
template
=
self
.
portal
.
restrictedTraverse
(
template
=
self
.
portal
.
restrictedTraverse
(
self
.
portal
.
portal_preferences
.
getPreferredDefaultPrePaymentSubscriptionInvoiceTemplate
())
self
.
portal
.
portal_preferences
.
getPreferredDefaultPrePaymentSubscriptionInvoiceTemplate
())
current_invoice
=
template
.
Base_createCloneDocument
(
batch_mode
=
1
)
current_invoice
=
template
.
Base_createCloneDocument
(
batch_mode
=
1
)
current_invoice
.
edit
(
current_invoice
.
edit
(
specialise_value
=
sale_trade_condition
,
destination_value
=
person
,
destination_value
=
person
,
destination_section_value
=
person
,
destination_section_value
=
person
,
destination_decision_value
=
person
,
destination_decision_value
=
person
,
...
@@ -176,7 +184,7 @@ class TestSlapOSAccounting(SlapOSTestCaseMixin):
...
@@ -176,7 +184,7 @@ class TestSlapOSAccounting(SlapOSTestCaseMixin):
cell
=
current_invoice
[
"1"
][
"movement_0"
]
cell
=
current_invoice
[
"1"
][
"movement_0"
]
cell
.
edit
(
quantity
=
1
)
cell
.
edit
(
quantity
=
1
)
cell
.
setPrice
(
1
)
cell
.
setPrice
(
1
)
current_invoice
.
plan
()
current_invoice
.
plan
()
current_invoice
.
confirm
()
current_invoice
.
confirm
()
current_invoice
.
startBuilding
()
current_invoice
.
startBuilding
()
...
@@ -184,8 +192,7 @@ class TestSlapOSAccounting(SlapOSTestCaseMixin):
...
@@ -184,8 +192,7 @@ class TestSlapOSAccounting(SlapOSTestCaseMixin):
current_invoice
.
stop
()
current_invoice
.
stop
()
self
.
tic
()
self
.
tic
()
current_invoice
.
Delivery_manageBuildingCalculatingDelivery
()
self
.
tic
()
applied_rule
=
current_invoice
.
getCausalityRelated
(
portal_type
=
"Applied Rule"
)
applied_rule
=
current_invoice
.
getCausalityRelated
(
portal_type
=
"Applied Rule"
)
for
sm
in
self
.
portal
.
portal_catalog
(
portal_type
=
'Simulation Movement'
,
for
sm
in
self
.
portal
.
portal_catalog
(
portal_type
=
'Simulation Movement'
,
simulation_state
=
[
'draft'
,
'planned'
,
None
],
simulation_state
=
[
'draft'
,
'planned'
,
None
],
...
...
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