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
Titouan Soulard
slapos.core
Commits
73723ee8
Commit
73723ee8
authored
Dec 06, 2012
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support document marked destroyed during creation.
parent
f38e0049
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
2 deletions
+42
-2
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Instance_solveInvoicingGeneration.xml
...s/slapos_accounting/Instance_solveInvoicingGeneration.xml
+2
-1
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingAlarm.py
..._accounting/TestTemplateItem/testSlapOSAccountingAlarm.py
+39
-0
master/bt5/slapos_accounting/bt/revision
master/bt5/slapos_accounting/bt/revision
+1
-1
No files found.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Instance_solveInvoicingGeneration.xml
View file @
73723ee8
...
...
@@ -76,6 +76,7 @@ if portal_workflow.isTransitionPossible(instance, \'converge\'):\n
history_entry = history_list[previous_length-1]\n
\n
# no divergence if no new history entry\n
if (history_length != 1):\n
assert previous_length != history_length\n
\n
setup_quantity = 0\n
...
...
master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingAlarm.py
View file @
73723ee8
...
...
@@ -646,6 +646,45 @@ class TestInstanceInvoicingAlarm(testSlapOSMixin):
self
.
check_instance_delivery
(
delivery
,
start_date
,
stop_date
,
person
,
1
)
self
.
check_instance_movement
(
update_line
,
instance
,
subscription
,
2
)
@
withAbort
def
test_instance_in_only_destroyed_state
(
self
):
person
=
self
.
portal
.
person_module
.
template_member
\
.
Base_createCloneDocument
(
batch_mode
=
1
)
subscription
=
self
.
portal
.
hosting_subscription_module
\
.
template_hosting_subscription
.
Base_createCloneDocument
(
batch_mode
=
1
)
subscription
.
edit
(
reference
=
'TESTHS-%s'
%
self
.
generateNewId
(),
destination_section_value
=
person
)
instance
=
self
.
portal
.
software_instance_module
\
.
template_slave_instance
.
Base_createCloneDocument
(
batch_mode
=
1
)
new_id
=
self
.
generateNewId
()
instance
.
edit
(
title
=
"Instance %s"
%
new_id
,
reference
=
"TESTINST-%s"
%
new_id
,
destination_reference
=
"TESTINST-%s"
%
new_id
,
specialise_value
=
subscription
,
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
instance
,
'diverged'
)
stop_date
=
DateTime
(
'2222/11/15'
)
instance
.
workflow_history
[
'instance_slap_interface_workflow'
]
=
[{
'comment'
:
'Directly in destroyed state'
,
'error_message'
:
''
,
'actor'
:
'ERP5TypeTestCase'
,
'slap_state'
:
'destroy_requested'
,
'time'
:
stop_date
,
'action'
:
'foo_transition'
}]
instance
.
Instance_solveInvoicingGeneration
()
self
.
assertEqual
(
instance
.
getCausalityState
(),
'solved'
)
self
.
assertNotEqual
(
None
,
instance
.
getCausalityValue
())
self
.
assertEqual
(
1
,
instance
.
getInvoicingSynchronizationPointer
())
delivery
=
instance
.
getCausalityValue
()
setup_line
,
update_line
,
destroy_line
=
\
self
.
check_instance_delivery
(
delivery
,
stop_date
,
stop_date
,
person
,
1
)
self
.
check_instance_movement
(
update_line
,
instance
,
subscription
,
1
)
class
TestOpenSaleOrderAlarm
(
testSlapOSMixin
):
def
test_noOSO_newPerson
(
self
):
person
=
self
.
portal
.
person_module
.
template_member
\
...
...
master/bt5/slapos_accounting/bt/revision
View file @
73723ee8
199
\ No newline at end of file
200
\ 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