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
Léo-Paul Géneau
erp5
Commits
a1a9bfe8
Commit
a1a9bfe8
authored
Dec 13, 2019
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounting_ui_test: fix pylint issues
and re-enable coding style test
parent
e0c2f7a2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
6 additions
and
28 deletions
+6
-28
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTestReportDataset.py
...ingTransactionModule_createAccountingTestReportDataset.py
+0
-1
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTestReportJournalDataset.py
...sactionModule_createAccountingTestReportJournalDataset.py
+0
-1
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTransactionList.py
...ntingTransactionModule_createAccountingTransactionList.py
+3
-11
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTransactionListSalesAndPayments.py
...Module_createAccountingTransactionListSalesAndPayments.py
+1
-4
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTransactionListWithPersons.py
...ctionModule_createAccountingTransactionListWithPersons.py
+0
-8
bt5/erp5_accounting_ui_test/bt/description
bt5/erp5_accounting_ui_test/bt/description
+2
-2
bt5/erp5_accounting_ui_test/bt/skip_coding_style_test
bt5/erp5_accounting_ui_test/bt/skip_coding_style_test
+0
-1
No files found.
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTestReportDataset.py
View file @
a1a9bfe8
...
...
@@ -8,7 +8,6 @@ from DateTime import DateTime
portal
=
context
.
getPortalObject
()
person_module
=
portal
.
person_module
accounting_module
=
portal
.
accounting_module
account_module
=
portal
.
account_module
organisation_module
=
portal
.
organisation_module
...
...
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTestReportJournalDataset.py
View file @
a1a9bfe8
from
DateTime
import
DateTime
portal
=
context
.
getPortalObject
()
accounting_module
=
portal
.
accounting_module
account_module
=
portal
.
account_module
one_hour
=
1.0
/
24.0
...
...
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTransactionList.py
View file @
a1a9bfe8
...
...
@@ -41,10 +41,9 @@ for accounting_type_id in portal.getPortalAccountingTransactionTypeList():
ledger_value_list
=
list
(
portal
.
portal_categories
.
ledger
.
test_accounting
.
contentValues
())
if
set_ledger
else
())
test_ledger_1
=
test_ledger_2
=
None
test_ledger_1
=
None
if
set_ledger
:
test_ledger_1
=
portal
.
portal_categories
.
ledger
.
test_accounting
.
test_ledger_1
test_ledger_2
=
portal
.
portal_categories
.
ledger
.
test_accounting
.
test_ledger_2
def
getAccountByTitle
(
title
):
account_list
=
[
x
.
getObject
().
getRelativeUrl
()
for
x
in
...
...
@@ -65,13 +64,6 @@ section = getOrganisationByTitle(section_title)
euro_resource
=
'currency_module/euro'
def
getBankAccountByTitle
(
title
):
document_list
=
[
x
.
getObject
().
getRelativeUrl
()
for
x
in
portal
.
portal_catalog
(
portal_type
=
'Bank Account'
,
title
=
SimpleQuery
(
title
=
title
,
comparison_operator
=
'='
))]
assert
len
(
document_list
)
==
1
,
\
'%d Bank Account with title "%s"'
%
(
len
(
document_list
),
title
)
return
document_list
[
0
]
product_list
=
[
o
.
getObject
()
for
o
in
portal
.
portal_catalog
(
portal_type
=
'Product'
,
...
...
@@ -82,7 +74,7 @@ else:
product
=
portal
.
product_module
.
newContent
(
portal_type
=
'Product'
,
title
=
'Dummy Product for testing'
)
for
i
in
range
(
random
.
randint
(
5
,
10
)):
for
_
in
range
(
random
.
randint
(
5
,
10
)):
pl
=
portal
.
sale_packing_list_module
.
newContent
(
portal_type
=
'Sale Packing List'
,
title
=
'Dummy Packing List for testing'
,
...
...
@@ -211,7 +203,7 @@ for month in range(1, month_count + 1):
for
line
in
payment
.
getMovementList
(
portal_type
=
payment
.
getPortalAccountingMovementTypeList
()):
if
line
.
getGroupingReference
():
line
.
activate
(
after_tag
=
tag
).
AccountingTransactionLine_resetGroupingReference
()
line
.
activate
(
after_tag
=
tag
).
AccountingTransactionLine_resetGroupingReference
()
else
:
# other cases not supported for now
...
...
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTransactionListSalesAndPayments.py
View file @
a1a9bfe8
...
...
@@ -8,8 +8,6 @@ portal = context.getPortalObject()
accounting_module
=
portal
.
accounting_module
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
())
...
...
@@ -75,7 +73,6 @@ for month in range(1, month_count + 1):
specialise
=
business_process
,
)
receivable_qty
=
-
(
amount
*
(
1
+
vat_rate
))
total_receivable_quantity
+=
receivable_qty
tr
.
newContent
(
portal_type
=
'Sale Invoice Transaction Line'
,
source
=
getAccountByTitle
(
'Receivable'
),
destination
=
getAccountByTitle
(
'Payable'
),
...
...
@@ -123,7 +120,7 @@ for month in range(1, month_count + 1):
for
line
in
ptr
.
getMovementList
(
portal_type
=
ptr
.
getPortalAccountingMovementTypeList
()):
if
line
.
getGroupingReference
():
line
.
activate
(
after_tag
=
tag
).
AccountingTransactionLine_resetGroupingReference
()
line
.
activate
(
after_tag
=
tag
).
AccountingTransactionLine_resetGroupingReference
()
accounting_module
.
setProperty
(
'current_content_script'
,
...
...
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingTransactionModule_createAccountingTransactionListWithPersons.py
View file @
a1a9bfe8
...
...
@@ -60,14 +60,6 @@ def getCurrencyByReference(reference):
return
document_list
[
0
]
euro_resource
=
getCurrencyByReference
(
'EUR'
)
def
getBankAccountByTitle
(
title
):
document_list
=
[
x
.
getObject
().
getRelativeUrl
()
for
x
in
portal
.
portal_catalog
(
portal_type
=
'Bank Account'
,
title
=
SimpleQuery
(
title
=
title
,
comparison_operator
=
'='
))]
assert
len
(
document_list
)
==
1
,
\
'%d Bank Account with title "%s"'
%
(
len
(
document_list
),
title
)
return
document_list
[
0
]
for
month
in
range
(
1
,
month_count
+
1
):
day
=
1
vat_rate
=
.
1
...
...
bt5/erp5_accounting_ui_test/bt/description
View file @
a1a9bfe8
Functional test suites for erp5_accounting.
Functional test suites for erp5_accounting.
Contains sample data as path items that may overwrite your existing data. Use at your own risks.
\ No newline at end of file
bt5/erp5_accounting_ui_test/bt/skip_coding_style_test
deleted
100644 → 0
View file @
e0c2f7a2
1
\ 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