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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
bd95d731
Commit
bd95d731
authored
Mar 31, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests for account statement with project
parent
ad24c91e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
0 deletions
+66
-0
product/ERP5/tests/testAccountingReports.py
product/ERP5/tests/testAccountingReports.py
+66
-0
No files found.
product/ERP5/tests/testAccountingReports.py
View file @
bd95d731
...
...
@@ -2120,6 +2120,72 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
assertTrue
(
line_list
[
-
1
].
isStatLine
())
self
.
checkLineProperties
(
line_list
[
-
1
],
debit_price
=
100
,
credit_price
=
200
)
def
testAccountStatementProject
(
self
):
# test account statement to a project
self
.
createProjectAndFunctionDataSet
()
request_form
=
self
.
portal
.
REQUEST
.
form
request_form
[
'node'
]
=
\
self
.
portal
.
account_module
.
receivable
.
getRelativeUrl
()
request_form
[
'from_date'
]
=
DateTime
(
2006
,
1
,
1
)
request_form
[
'at_date'
]
=
DateTime
(
2006
,
12
,
31
)
request_form
[
'section_category'
]
=
'group/demo_group'
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'project'
]
=
self
.
project_1
.
getRelativeUrl
()
request_form
[
'hide_analytic'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
'AccountModule_viewAccountStatementReport'
)
self
.
assertEqual
(
1
,
len
(
report_section_list
))
line_list
=
self
.
getListBoxLineList
(
report_section_list
[
0
])
data_line_list
=
[
l
for
l
in
line_list
if
l
.
isDataLine
()]
self
.
assertEqual
(
1
,
len
(
data_line_list
))
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'1'
,
Movement_getExplanationTitle
=
'Function a Project 1'
,
date
=
DateTime
(
2006
,
2
,
2
),
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
500
,
credit_price
=
0
,
running_total_price
=
500
,
)
self
.
assertTrue
(
line_list
[
-
1
].
isStatLine
())
self
.
checkLineProperties
(
line_list
[
-
1
],
debit_price
=
500
,
credit_price
=
0
)
def
testAccountStatementNoProject
(
self
):
# test account statement to no project
self
.
createProjectAndFunctionDataSet
()
request_form
=
self
.
portal
.
REQUEST
.
form
request_form
[
'node'
]
=
\
self
.
portal
.
account_module
.
receivable
.
getRelativeUrl
()
request_form
[
'from_date'
]
=
DateTime
(
2006
,
1
,
1
)
request_form
[
'at_date'
]
=
DateTime
(
2006
,
12
,
31
)
request_form
[
'section_category'
]
=
'group/demo_group'
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'project'
]
=
'None'
request_form
[
'hide_analytic'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
'AccountModule_viewAccountStatementReport'
)
self
.
assertEqual
(
1
,
len
(
report_section_list
))
line_list
=
self
.
getListBoxLineList
(
report_section_list
[
0
])
data_line_list
=
[
l
for
l
in
line_list
if
l
.
isDataLine
()]
self
.
assertEqual
(
1
,
len
(
data_line_list
))
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'3'
,
Movement_getExplanationTitle
=
'No function no project'
,
date
=
DateTime
(
2006
,
2
,
2
),
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
700
,
credit_price
=
0
,
running_total_price
=
700
,
)
self
.
assertTrue
(
line_list
[
-
1
].
isStatLine
())
self
.
checkLineProperties
(
line_list
[
-
1
],
debit_price
=
700
,
credit_price
=
0
)
def
testTrialBalance
(
self
):
# Simple test of trial balance
# we will use the same data set as account statement
...
...
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