Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Richard
erp5
Commits
0968e24f
Commit
0968e24f
authored
Jan 25, 2018
by
Tomáš Peterka
Committed by
Tomáš Peterka
Jan 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[accounting_ui_test] Revert independence of tests because they do not work independently
parent
42ff8042
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
0 deletions
+34
-0
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createAccountingTransactionList.py
...i_test/AccountingZuite_createAccountingTransactionList.py
+12
-0
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createAccountingTransactionListSalesAndPayments.py
...gZuite_createAccountingTransactionListSalesAndPayments.py
+11
-0
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createAccountingTransactionListWithPersons.py
...untingZuite_createAccountingTransactionListWithPersons.py
+9
-0
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_initializeAccountingTransactionTemplateTest.py
...ntingZuite_initializeAccountingTransactionTemplateTest.py
+2
-0
No files found.
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createAccountingTransactionList.py
View file @
0968e24f
...
...
@@ -13,6 +13,15 @@ business_process = portal.portal_catalog.getResultValue(
'erp5_default_business_process'
),
# erp5_simulation_test
portal_type
=
'Business Process'
).
getRelativeUrl
()
# if the previous test didn't change input data, no need to recreate content
current_script_data_id
=
'%s_month_count_%s_draft_%s_state_%s_payment_%s_leger_%s'
%
(
month_count
,
add_draft_transactions
,
transaction_state
,
add_related_payments
,
set_ledger
,
script
.
getId
())
if
accounting_module
.
getProperty
(
'current_content_script'
,
''
)
==
current_script_data_id
:
return
"Accounting Transactions Created."
# first, cleanup accounting module
# XXX should be done in an external script / tool, because we have to
# workaround some security checks
...
...
@@ -271,6 +280,9 @@ if add_draft_transactions:
source
=
getAccountByTitle
(
'Goods Sales'
),
quantity
=
random
.
randint
(
300
,
400
),)
accounting_module
.
setProperty
(
'current_content_script'
,
current_script_data_id
)
# test depends on this
return
"Accounting Transactions Created."
# vim: syntax=python
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createAccountingTransactionListSalesAndPayments.py
View file @
0968e24f
...
...
@@ -10,6 +10,13 @@ year = 2005
total_receivable_quantity
=
0
# if the previous test didn't change input data, no need to recreate content
current_script_data_id
=
'%s_month_count_%s'
%
(
month_count
,
script
.
getId
())
if
accounting_module
.
getProperty
(
'current_content_script'
,
''
)
==
current_script_data_id
:
return
"Accounting Transactions Created."
# first, cleanup accounting module
# XXX should be done in an external script / tool, because we have to
# workaround some security checks
...
...
@@ -120,6 +127,10 @@ for month in range(1, month_count + 1):
'immediateReindexObject'
)),
).
AccountingTransactionLine_resetGroupingReference
()
accounting_module
.
setProperty
(
'current_content_script'
,
current_script_data_id
)
# test depends on this
return
"Accounting Transactions Created."
# vim: syntax=python
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createAccountingTransactionListWithPersons.py
View file @
0968e24f
...
...
@@ -7,6 +7,13 @@ from DateTime import DateTime
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
year
=
2005
# if the previous test didn't change input data, no need to recreate content
current_script_data_id
=
'%s_month_count_%s'
%
(
month_count
,
script
.
getId
())
if
accounting_module
.
getProperty
(
'current_content_script'
,
''
)
==
current_script_data_id
:
return
"Accounting Transactions Created."
# first, cleanup accounting module
# XXX should be done in an external script / tool, because we have to
...
...
@@ -92,6 +99,8 @@ for month in range(1, month_count + 1):
tr
.
setSourceReference
(
'source_reference'
)
tr
.
setDestinationReference
(
'destination_reference'
)
accounting_module
.
setProperty
(
'current_content_script'
,
current_script_data_id
)
# test depends on this
return
"Accounting Transactions Created."
...
...
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_initializeAccountingTransactionTemplateTest.py
View file @
0968e24f
...
...
@@ -3,5 +3,7 @@ module = portal.accounting_module
module
.
manage_delObjects
(
list
(
module
.
objectIds
()))
module
.
setProperty
(
'current_content_script'
,
script
.
getId
())
# test depends on this
return
"Accounting Transactions Created."
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