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
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
Tatuya Kamada
erp5
Commits
72dfb2c4
Commit
72dfb2c4
authored
Jan 08, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounting: apply the same change than GL on account statement
parent
8c313674
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
630 additions
and
476 deletions
+630
-476
bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/account_statement_export.xml
...nting%20Transaction%20Module/account_statement_export.xml
+4
-2
bt5/erp5_accounting/ActionTemplateItem/portal_types/Organisation/account_statement_export.xml
...em/portal_types/Organisation/account_statement_export.xml
+1
-1
bt5/erp5_accounting/ActionTemplateItem/portal_types/Person/account_statement_export.xml
...lateItem/portal_types/Person/account_statement_export.xml
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountStatementReportSectionList.xml
...ng/AccountModule_getAccountStatementReportSectionList.xml
+17
-9
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewAccountStatementReportDialog.xml
...unting/AccountModule_viewAccountStatementReportDialog.xml
+1
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewAccountStatementReportDialog/your_export.xml
...ntModule_viewAccountStatementReportDialog/your_export.xml
+110
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getNotGroupedAccountingTransactionList.xml
...unting/Account_getNotGroupedAccountingTransactionList.xml
+58
-78
product/ERP5/tests/testAccountingReports.py
product/ERP5/tests/testAccountingReports.py
+438
-385
No files found.
bt5/erp5_accounting/ActionTemplateItem/portal_types/Accounting%20Transaction%20Module/account_statement_export.xml
View file @
72dfb2c4
...
@@ -30,7 +30,9 @@
...
@@ -30,7 +30,9 @@
</item>
</item>
<item>
<item>
<key>
<string>
description
</string>
</key>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
<value>
<none/>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
icon
</string>
</key>
<key>
<string>
icon
</string>
</key>
...
@@ -73,7 +75,7 @@
...
@@ -73,7 +75,7 @@
<key>
<string>
text
</string>
</key>
<key>
<string>
text
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<value>
<string
encoding=
"cdata"
>
<![CDATA[
string:${object_url}/AccountModule_viewAccountStatementReportDialog?your_portal_skin=ODS&your_format=
string:${object_url}/AccountModule_viewAccountStatementReportDialog?your_portal_skin=ODS&your_format=
&field_your_export:int=1
]]>
</string>
</value>
]]>
</string>
</value>
</item>
</item>
...
...
bt5/erp5_accounting/ActionTemplateItem/portal_types/Organisation/account_statement_export.xml
View file @
72dfb2c4
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
<key>
<string>
text
</string>
</key>
<key>
<string>
text
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<value>
<string
encoding=
"cdata"
>
<![CDATA[
string:${object_url}/accounting_module/AccountModule_viewAccountStatementReportDialog?mirror_section=${object/getRelativeUrl}&your_portal_skin=ODS&your_format=
string:${object_url}/accounting_module/AccountModule_viewAccountStatementReportDialog?mirror_section=${object/getRelativeUrl}&your_portal_skin=ODS&your_format=
&field_your_export:int=1
]]>
</string>
</value>
]]>
</string>
</value>
</item>
</item>
...
...
bt5/erp5_accounting/ActionTemplateItem/portal_types/Person/account_statement_export.xml
View file @
72dfb2c4
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
<key>
<string>
text
</string>
</key>
<key>
<string>
text
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<value>
<string
encoding=
"cdata"
>
<![CDATA[
string:${object_url}/accounting_module/AccountModule_viewAccountStatementReportDialog?mirror_section=${object/getRelativeUrl}&your_portal_skin=ODS&your_format=
string:${object_url}/accounting_module/AccountModule_viewAccountStatementReportDialog?mirror_section=${object/getRelativeUrl}&your_portal_skin=ODS&your_format=
&field_your_export:int=1
]]>
</string>
</value>
]]>
</string>
</value>
</item>
</item>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountStatementReportSectionList.xml
View file @
72dfb2c4
...
@@ -90,6 +90,8 @@ period_start_date = context\\\n
...
@@ -90,6 +90,8 @@ period_start_date = context\\\n
section_category=request[\'section_category\'],\n
section_category=request[\'section_category\'],\n
date=from_date or at_date)\n
date=from_date or at_date)\n
\n
\n
export = request[\'export\']\n
\n
# Also get the currency, to know the precision\n
# Also get the currency, to know the precision\n
currency = context.Base_getCurrencyForSection(request[\'section_category\'])\n
currency = context.Base_getCurrencyForSection(request[\'section_category\'])\n
precision = context.account_module.getQuantityPrecisionFromResource(currency)\n
precision = context.account_module.getQuantityPrecisionFromResource(currency)\n
...
@@ -144,21 +146,27 @@ if hide_analytic:\n
...
@@ -144,21 +146,27 @@ if hide_analytic:\n
else:\n
else:\n
analytic_column_list = context.AccountModule_getAnalyticColumnList()\n
analytic_column_list = context.AccountModule_getAnalyticColumnList()\n
params[\'analytic_column_list\'] = analytic_column_list\n
params[\'analytic_column_list\'] = analytic_column_list\n
request.set(\'analytic_column_list\', analytic_column_list) # for Movement_getExplanationTitleAndAnalytics\n
\n
\n
selection_columns = (\n
selection_columns = (\n
(\'date\', \'Operation Date\'),\n
(\'Movement_getSpecificReference\', \'Transaction Reference\'),\n
(\'Movement_getSpecificReference\', \'Transaction Reference\'),\n
(\'
date\', \'Dat
e\'),\n
(\'
Movement_getExplanationTitleAndAnalytics\', \'Title\\nReference and Analytics\' if analytic_column_list else \'Title\\nReferenc
e\'),\n
(\'Movement_getExplanationTitle\', \'Accounting Transaction Title\'),
)\n
)\n
if len(section_uid) >
1:\n
if len(section_uid) >
1:\n
selection_columns += ( (\'section_title\', \'Section\'), )\n
selection_columns += ((\'section_title\', \'Section\'),)\n
selection_columns += analytic_column_list\n
if not mirror_section:\n
selection_columns += ( (\'Movement_getMirrorSectionTitle\', \'Third Party\'), )\n
selection_columns += (\n
selection_columns += (\n
(\'Movement_getExplanationReference\', \'Document Reference\'),\n
(\'debit_price\', \'Debit\'),\n
(\'debit_price\', \'Debit\'),\n
(\'credit_price\', \'Credit\'),\n
(\'credit_price\', \'Credit\'),\n
(\'running_total_price\', \'Net\'),)\n
(\'running_total_price\', \'Running Balance\'),\n
(\'grouping_reference\', \'Grouping Reference\'),\n
(\'grouping_date\', \'Grouping Date\'),\n
(\'modification_date\', \'Modification Date\'),\n
(\'getTranslatedSimulationStateTitle\', \'State\'),\n
)\n
\n
if export:\n
selection_columns = context.AccountModule_getGeneralLedgerColumnItemList()\n
\n
\n
report_section_list = []\n
report_section_list = []\n
if from_date and detailed_from_date_summary:\n
if from_date and detailed_from_date_summary:\n
...
@@ -185,7 +193,7 @@ if from_date and detailed_from_date_summary:\n
...
@@ -185,7 +193,7 @@ if from_date and detailed_from_date_summary:\n
report_section_list.append(\n
report_section_list.append(\n
ReportSection(\n
ReportSection(\n
path=node,\n
path=node,\n
form_id=\'Account_viewAccountingTransactionList\',\n
form_id=\'Account_viewAccountingTransactionList
Export\' if export else \'Account_viewAccountingTransactionList
\',\n
selection_name=\'account_preference_selection\',\n
selection_name=\'account_preference_selection\',\n
selection_params=params,\n
selection_params=params,\n
selection_columns=selection_columns,\n
selection_columns=selection_columns,\n
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewAccountStatementReportDialog.xml
View file @
72dfb2c4
...
@@ -112,6 +112,7 @@
...
@@ -112,6 +112,7 @@
<list>
<list>
<string>
your_simulation_state
</string>
<string>
your_simulation_state
</string>
<string>
your_portal_type
</string>
<string>
your_portal_type
</string>
<string>
your_export
</string>
</list>
</list>
</value>
</value>
</item>
</item>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewAccountStatementReportDialog/your_export.xml
0 → 100644
View file @
72dfb2c4
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
css_class
</string>
<string>
hidden
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_export
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string>
hidden_label
</string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_checkbox
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Export Mode
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getNotGroupedAccountingTransactionList.xml
View file @
72dfb2c4
...
@@ -51,12 +51,9 @@
...
@@ -51,12 +51,9 @@
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
from Products.PythonScripts.standard import Object\n
<value>
<string>
from Products.PythonScripts.standard import Object\n
from Products.ERP5Type.Document import newTempBase\n
from Products.ERP5Type.Message import Message\n
portal = context.getPortalObject()\n
portal = context.getPortalObject()\n
getObject = portal.portal_catalog.getObject\n
getObject = portal.portal_catalog.getObject\n
params = portal.ERP5Accounting_getParams(selection_name)\n
params = portal.ERP5Accounting_getParams(selection_name)\n
N_ = lambda msg: Message(\'erp5_ui\', msg)\n
\n
\n
# this also prevents to be called directly\n
# this also prevents to be called directly\n
assert \'node_uid\' in kw\n
assert \'node_uid\' in kw\n
...
@@ -141,31 +138,14 @@ for brain in portal.Base_zGetNotGroupedMovementList(\n
...
@@ -141,31 +138,14 @@ for brain in portal.Base_zGetNotGroupedMovementList(\n
total_price=brain.total_price,\n
total_price=brain.total_price,\n
date=brain.date,\n
date=brain.date,\n
Movement_getSpecificReference=specific_reference,\n
Movement_getSpecificReference=specific_reference,\n
Movement_getMirrorSectionT
itle=mirror_section_title,\n
mirror_section_t
itle=mirror_section_title,\n
section_title=section_title,\n
section_title=section_title,\n
debit=debit,\n
debit=debit,\n
credit=credit,\n
credit=credit,\n
debit_price=debit_price,\n
debit_price=debit_price,\n
credit_price=credit_price,\n
credit_price=credit_price,\n
Movement_getExplanationTitle=\n
Movement_getExplanationTitleAndAnalytics=brain.Movement_getExplanationTitleAndAnalytics(brain))\n
mvt.hasTitle() and mvt.getTitle() or transaction.getTitle())\n
\n
\n
analytic_info = {}\n
for analytic_column, analytic_column_title in analytic_column_list:\n
if analytic_column == \'project\':\n
if is_source:\n
analytic_info[\'project\'] = mvt.asContext(project_uid=mvt.getSourceProjectUid()).Movement_getProjectTitle()\n
else:\n
analytic_info[\'project\'] = mvt.asContext(project_uid=mvt.getDestinationProjectUid()).Movement_getProjectTitle()\n
elif analytic_column == \'function\':\n
if is_source:\n
analytic_info[\'function\'] = mvt.asContext(function_uid=mvt.getDestinationFunctionUid()).Movement_getFunctionTitle()\n
else:\n
analytic_info[\'function\'] = mvt.asContext(function_uid=mvt.getDestinationFunctionUid()).Movement_getFunctionTitle()\n
else:\n
analytic_info[analytic_column] = mvt.getProperty(analytic_column)\n
\n
line.update(analytic_info)\n
line_list.append(line)\n
line_list.append(line)\n
\n
\n
\n
\n
...
...
product/ERP5/tests/testAccountingReports.py
View file @
72dfb2c4
...
@@ -673,6 +673,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -673,6 +673,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
t1
=
self
.
_makeOne
(
t1
=
self
.
_makeOne
(
portal_type
=
'Sale Invoice Transaction'
,
portal_type
=
'Sale Invoice Transaction'
,
title
=
'Transaction 1'
,
title
=
'Transaction 1'
,
reference
=
'ref1'
,
source_reference
=
'1'
,
source_reference
=
'1'
,
simulation_state
=
'delivered'
,
simulation_state
=
'delivered'
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
...
@@ -685,6 +686,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -685,6 +686,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
t2
=
self
.
_makeOne
(
t2
=
self
.
_makeOne
(
portal_type
=
'Sale Invoice Transaction'
,
portal_type
=
'Sale Invoice Transaction'
,
title
=
'Transaction 2'
,
title
=
'Transaction 2'
,
reference
=
'ref2'
,
source_reference
=
'2'
,
source_reference
=
'2'
,
simulation_state
=
'delivered'
,
simulation_state
=
'delivered'
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
...
@@ -697,6 +699,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -697,6 +699,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
t3
=
self
.
_makeOne
(
t3
=
self
.
_makeOne
(
portal_type
=
'Sale Invoice Transaction'
,
portal_type
=
'Sale Invoice Transaction'
,
title
=
'Transaction 3'
,
title
=
'Transaction 3'
,
reference
=
'ref3'
,
source_reference
=
'3'
,
source_reference
=
'3'
,
simulation_state
=
'delivered'
,
simulation_state
=
'delivered'
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
...
@@ -823,6 +826,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -823,6 +826,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'section_category_strict'
]
=
False
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -845,67 +849,56 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -845,67 +849,56 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
# test columns values
# test columns values
line
=
data_line_list
[
0
]
line
=
data_line_list
[
0
]
self
.
assertEqual
(
line
.
column_id_list
,
self
.
assertEqual
(
line
.
column_id_list
,
[
'Movement_getSpecificReference'
,
'date'
,
[
'date'
,
'Movement_getSpecificReference'
,
'Movement_getExplanationTitle'
,
'Movement_getMirrorSectionTitle'
,
'Movement_getExplanationTitleAndAnalytics'
,
'debit_price'
,
'Movement_getExplanationReference'
,
'credit_price'
,
'running_total_price'
,
'grouping_reference'
,
'debit_price'
,
'credit_price'
,
'running_total_price'
])
'grouping_date'
,
'modification_date'
,
'getTranslatedSimulationStateTitle'
])
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'1'
,
Movement_getSpecificReference
=
'1'
,
Movement_getExplanationReference
=
'ref1'
,
date
=
DateTime
(
2006
,
2
,
1
),
date
=
DateTime
(
2006
,
2
,
1
),
Movement_getExplanationTitle
=
'Transaction 1'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 1
\
n
ref1'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
100
,
debit_price
=
100
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=
100
)
running_total_price
=
100
)
self
.
checkLineProperties
(
data_line_list
[
1
],
self
.
checkLineProperties
(
data_line_list
[
1
],
Movement_getSpecificReference
=
'2'
,
Movement_getSpecificReference
=
'2'
,
Movement_getExplanationReference
=
'ref2'
,
date
=
DateTime
(
2006
,
2
,
1
,
0
,
1
),
date
=
DateTime
(
2006
,
2
,
1
,
0
,
1
),
Movement_getExplanationTitle
=
'Transaction 2'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 2
\
n
ref2'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
0
,
debit_price
=
0
,
credit_price
=
200
,
credit_price
=
200
,
running_total_price
=-
100
)
running_total_price
=-
100
)
self
.
checkLineProperties
(
data_line_list
[
2
],
self
.
checkLineProperties
(
data_line_list
[
2
],
Movement_getSpecificReference
=
'3'
,
Movement_getSpecificReference
=
'3'
,
Movement_getExplanationReference
=
'ref3'
,
date
=
DateTime
(
2006
,
2
,
2
,
0
,
2
),
date
=
DateTime
(
2006
,
2
,
2
,
0
,
2
),
Movement_getExplanationTitle
=
'Transaction 3'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 3
\
n
ref3'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
300
,
debit_price
=
300
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=
200
)
running_total_price
=
200
)
self
.
checkLineProperties
(
data_line_list
[
3
],
self
.
checkLineProperties
(
data_line_list
[
3
],
Movement_getSpecificReference
=
'4'
,
Movement_getSpecificReference
=
'4'
,
Movement_getExplanationReference
=
'ref4'
,
date
=
DateTime
(
2006
,
2
,
2
,
0
,
3
),
date
=
DateTime
(
2006
,
2
,
2
,
0
,
3
),
Movement_getExplanationTitle
=
'Transaction 4'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 4
\
n
ref4'
,
Movement_getMirrorSectionTitle
=
'Client 2'
,
debit_price
=
400
,
debit_price
=
400
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=
600
)
running_total_price
=
600
)
self
.
checkLineProperties
(
data_line_list
[
4
],
self
.
checkLineProperties
(
data_line_list
[
4
],
Movement_getSpecificReference
=
'5'
,
Movement_getSpecificReference
=
'5'
,
Movement_getExplanationReference
=
'ref5'
,
date
=
DateTime
(
2006
,
2
,
2
,
0
,
4
),
date
=
DateTime
(
2006
,
2
,
2
,
0
,
4
),
Movement_getExplanationTitle
=
'Transaction 5'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 5
\
n
ref5'
,
Movement_getMirrorSectionTitle
=
'John Smith'
,
debit_price
=
500
,
debit_price
=
500
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=
1100
)
running_total_price
=
1100
)
self
.
checkLineProperties
(
data_line_list
[
5
],
self
.
checkLineProperties
(
data_line_list
[
5
],
Movement_getSpecificReference
=
'6'
,
Movement_getSpecificReference
=
'6'
,
Movement_getExplanationReference
=
'ref6'
,
date
=
DateTime
(
2006
,
2
,
2
,
0
,
5
),
date
=
DateTime
(
2006
,
2
,
2
,
0
,
5
),
Movement_getExplanationTitle
=
'Transaction 6'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 6
\
n
ref6'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
600
,
debit_price
=
600
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=
1700
)
running_total_price
=
1700
)
...
@@ -914,8 +907,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -914,8 +907,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
line_list
[
-
1
],
self
.
checkLineProperties
(
line_list
[
-
1
],
Movement_getSpecificReference
=
None
,
Movement_getSpecificReference
=
None
,
date
=
None
,
date
=
None
,
Movement_getExplanationTitle
=
None
,
Movement_getExplanationTitleAndAnalytics
=
None
,
Movement_getMirrorSectionTitle
=
None
,
debit_price
=
1900
,
debit_price
=
1900
,
credit_price
=
200
,
credit_price
=
200
,
running_total_price
=
None
)
running_total_price
=
None
)
...
@@ -935,6 +927,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -935,6 +927,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'section_category_strict'
]
=
False
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -948,8 +941,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -948,8 +941,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'Previous Balance'
,
Movement_getSpecificReference
=
'Previous Balance'
,
date
=
DateTime
(
2006
,
2
,
2
),
date
=
DateTime
(
2006
,
2
,
2
),
Movement_getExplanationTitle
=
''
,
Movement_getExplanationTitleAndAnalytics
=
None
,
Movement_getMirrorSectionTitle
=
''
,
debit_price
=
100
,
debit_price
=
100
,
credit_price
=
200
,
credit_price
=
200
,
running_total_price
=-
100
)
running_total_price
=-
100
)
...
@@ -957,8 +949,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -957,8 +949,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
1
],
self
.
checkLineProperties
(
data_line_list
[
1
],
Movement_getSpecificReference
=
'3'
,
Movement_getSpecificReference
=
'3'
,
date
=
DateTime
(
2006
,
2
,
2
,
0
,
2
),
date
=
DateTime
(
2006
,
2
,
2
,
0
,
2
),
Movement_getExplanationTitle
=
'Transaction 3'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 3
\
n
ref3'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
300
,
debit_price
=
300
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=
200
)
running_total_price
=
200
)
...
@@ -966,8 +957,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -966,8 +957,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
2
],
self
.
checkLineProperties
(
data_line_list
[
2
],
Movement_getSpecificReference
=
'4'
,
Movement_getSpecificReference
=
'4'
,
date
=
DateTime
(
2006
,
2
,
2
,
0
,
3
),
date
=
DateTime
(
2006
,
2
,
2
,
0
,
3
),
Movement_getExplanationTitle
=
'Transaction 4'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 4
\
n
ref4'
,
Movement_getMirrorSectionTitle
=
'Client 2'
,
debit_price
=
400
,
debit_price
=
400
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=
600
)
running_total_price
=
600
)
...
@@ -975,8 +965,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -975,8 +965,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
3
],
self
.
checkLineProperties
(
data_line_list
[
3
],
Movement_getSpecificReference
=
'5'
,
Movement_getSpecificReference
=
'5'
,
date
=
DateTime
(
2006
,
2
,
2
,
0
,
4
),
date
=
DateTime
(
2006
,
2
,
2
,
0
,
4
),
Movement_getExplanationTitle
=
'Transaction 5'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 5
\
n
ref5'
,
Movement_getMirrorSectionTitle
=
'John Smith'
,
debit_price
=
500
,
debit_price
=
500
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=
1100
)
running_total_price
=
1100
)
...
@@ -984,8 +973,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -984,8 +973,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
4
],
self
.
checkLineProperties
(
data_line_list
[
4
],
Movement_getSpecificReference
=
'6'
,
Movement_getSpecificReference
=
'6'
,
date
=
DateTime
(
2006
,
2
,
2
,
0
,
5
),
date
=
DateTime
(
2006
,
2
,
2
,
0
,
5
),
Movement_getExplanationTitle
=
'Transaction 6'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 6
\
n
ref6'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
600
,
debit_price
=
600
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=
1700
)
running_total_price
=
1700
)
...
@@ -1009,6 +997,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1009,6 +997,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'section_category_strict'
]
=
False
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -1078,6 +1067,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1078,6 +1067,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'omit_grouping_reference'
]
=
True
request_form
[
'omit_grouping_reference'
]
=
True
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -1089,20 +1079,12 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1089,20 +1079,12 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
# we have 1 transactions, because 1st is grouped during the period.
# we have 1 transactions, because 1st is grouped during the period.
self
.
assertEqual
(
1
,
len
(
data_line_list
))
self
.
assertEqual
(
1
,
len
(
data_line_list
))
# test columns values
line
=
data_line_list
[
0
]
self
.
assertEqual
(
line
.
column_id_list
,
[
'Movement_getSpecificReference'
,
'date'
,
'Movement_getExplanationTitle'
,
'Movement_getMirrorSectionTitle'
,
'Movement_getExplanationReference'
,
'debit_price'
,
'credit_price'
,
'running_total_price'
])
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'2'
,
Movement_getSpecificReference
=
'2'
,
Movement_getExplanationReference
=
'ref2'
,
date
=
DateTime
(
2006
,
2
,
3
),
date
=
DateTime
(
2006
,
2
,
3
),
Movement_getExplanationTitle
=
'Grouped after period'
,
Movement_getExplanationTitleAndAnalytics
=
'Grouped after period
\
n
ref2'
,
Movement_getMirrorSectionTitle
=
'Client 2'
,
grouping_reference
=
'B'
,
grouping_date
=
DateTime
(
2006
,
3
,
2
),
debit_price
=
239.20
,
debit_price
=
239.20
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=
239.20
)
running_total_price
=
239.20
)
...
@@ -1111,8 +1093,6 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1111,8 +1093,6 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
line_list
[
-
1
],
self
.
checkLineProperties
(
line_list
[
-
1
],
Movement_getSpecificReference
=
None
,
Movement_getSpecificReference
=
None
,
date
=
None
,
date
=
None
,
Movement_getExplanationTitle
=
None
,
Movement_getMirrorSectionTitle
=
None
,
# The bottom line remain the same as when showing
# The bottom line remain the same as when showing
# grouped lines
# grouped lines
debit_price
=
358.80
,
debit_price
=
358.80
,
...
@@ -1195,6 +1175,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1195,6 +1175,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
t1
=
self
.
_makeOne
(
t1
=
self
.
_makeOne
(
portal_type
=
'Accounting Transaction'
,
portal_type
=
'Accounting Transaction'
,
title
=
'Transaction 1'
,
title
=
'Transaction 1'
,
reference
=
'ref1'
,
source_reference
=
'1'
,
source_reference
=
'1'
,
simulation_state
=
'delivered'
,
simulation_state
=
'delivered'
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
...
@@ -1207,6 +1188,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1207,6 +1188,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
t2
=
self
.
_makeOne
(
t2
=
self
.
_makeOne
(
portal_type
=
'Sale Invoice Transaction'
,
portal_type
=
'Sale Invoice Transaction'
,
title
=
'Transaction 2'
,
title
=
'Transaction 2'
,
reference
=
'ref2'
,
source_reference
=
'2'
,
source_reference
=
'2'
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
start_date
=
DateTime
(
2006
,
2
,
2
),
start_date
=
DateTime
(
2006
,
2
,
2
),
...
@@ -1220,6 +1202,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1220,6 +1202,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
t3
=
self
.
_makeOne
(
t3
=
self
.
_makeOne
(
portal_type
=
'Payment Transaction'
,
portal_type
=
'Payment Transaction'
,
title
=
'Transaction 3'
,
title
=
'Transaction 3'
,
reference
=
'ref3'
,
source_reference
=
'3'
,
source_reference
=
'3'
,
simulation_state
=
'delivered'
,
simulation_state
=
'delivered'
,
causality_value
=
t2
,
causality_value
=
t2
,
...
@@ -1239,6 +1222,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1239,6 +1222,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
t4
=
self
.
_makeOne
(
t4
=
self
.
_makeOne
(
portal_type
=
'Sale Invoice Transaction'
,
portal_type
=
'Sale Invoice Transaction'
,
title
=
'Transaction 4'
,
title
=
'Transaction 4'
,
reference
=
'ref4'
,
source_reference
=
'4'
,
source_reference
=
'4'
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
start_date
=
DateTime
(
2006
,
2
,
4
),
start_date
=
DateTime
(
2006
,
2
,
4
),
...
@@ -1250,6 +1234,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1250,6 +1234,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
t5
=
self
.
_makeOne
(
t5
=
self
.
_makeOne
(
portal_type
=
'Payment Transaction'
,
portal_type
=
'Payment Transaction'
,
title
=
'Transaction 5'
,
title
=
'Transaction 5'
,
reference
=
'ref5'
,
source_reference
=
'5'
,
source_reference
=
'5'
,
simulation_state
=
'delivered'
,
simulation_state
=
'delivered'
,
causality_value
=
t4
,
causality_value
=
t4
,
...
@@ -1276,6 +1261,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1276,6 +1261,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'detailed_from_date_summary'
]
=
1
request_form
[
'detailed_from_date_summary'
]
=
1
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -1296,15 +1282,13 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1296,15 +1282,13 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'1'
,
Movement_getSpecificReference
=
'1'
,
date
=
DateTime
(
2006
,
2
,
1
),
date
=
DateTime
(
2006
,
2
,
1
),
Movement_getExplanationTitle
=
'Transaction 1'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 1
\
n
ref1'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
100
,
debit_price
=
100
,
credit_price
=
0
,)
credit_price
=
0
,)
self
.
checkLineProperties
(
data_line_list
[
1
],
self
.
checkLineProperties
(
data_line_list
[
1
],
Movement_getSpecificReference
=
'4'
,
Movement_getSpecificReference
=
'4'
,
date
=
DateTime
(
2006
,
2
,
4
),
date
=
DateTime
(
2006
,
2
,
4
),
Movement_getExplanationTitle
=
'Transaction 4'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 4
\
n
ref4'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
400
,
debit_price
=
400
,
credit_price
=
0
,)
credit_price
=
0
,)
self
.
assertTrue
(
line_list
[
-
1
].
isStatLine
())
self
.
assertTrue
(
line_list
[
-
1
].
isStatLine
())
...
@@ -1318,16 +1302,13 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1318,16 +1302,13 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'Previous Balance'
,
Movement_getSpecificReference
=
'Previous Balance'
,
date
=
DateTime
(
2006
,
2
,
25
),
date
=
DateTime
(
2006
,
2
,
25
),
Movement_getExplanationTitle
=
''
,
Movement_getMirrorSectionTitle
=
''
,
running_total_price
=
500
,
running_total_price
=
500
,
debit_price
=
700
,
debit_price
=
700
,
credit_price
=
200
,)
credit_price
=
200
,)
self
.
checkLineProperties
(
data_line_list
[
1
],
self
.
checkLineProperties
(
data_line_list
[
1
],
Movement_getSpecificReference
=
'5'
,
Movement_getSpecificReference
=
'5'
,
date
=
DateTime
(
2006
,
3
,
1
),
date
=
DateTime
(
2006
,
3
,
1
),
Movement_getExplanationTitle
=
'Transaction 5'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 5
\
n
ref5'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
running_total_price
=
100
,
running_total_price
=
100
,
debit_price
=
0
,
debit_price
=
0
,
credit_price
=
400
,)
credit_price
=
400
,)
...
@@ -1348,6 +1329,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1348,6 +1329,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
t1
=
self
.
_makeOne
(
t1
=
self
.
_makeOne
(
portal_type
=
'Accounting Transaction'
,
portal_type
=
'Accounting Transaction'
,
title
=
'Transaction 1'
,
title
=
'Transaction 1'
,
reference
=
'ref1'
,
source_reference
=
'1'
,
source_reference
=
'1'
,
simulation_state
=
'delivered'
,
simulation_state
=
'delivered'
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
...
@@ -1361,6 +1343,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1361,6 +1343,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
t2
=
self
.
_makeOne
(
t2
=
self
.
_makeOne
(
portal_type
=
'Sale Invoice Transaction'
,
portal_type
=
'Sale Invoice Transaction'
,
title
=
'Transaction 2'
,
title
=
'Transaction 2'
,
reference
=
'ref2'
,
source_reference
=
'2'
,
source_reference
=
'2'
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
start_date
=
DateTime
(
2006
,
2
,
2
),
start_date
=
DateTime
(
2006
,
2
,
2
),
...
@@ -1374,6 +1357,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1374,6 +1357,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
t3
=
self
.
_makeOne
(
t3
=
self
.
_makeOne
(
portal_type
=
'Payment Transaction'
,
portal_type
=
'Payment Transaction'
,
title
=
'Transaction 3'
,
title
=
'Transaction 3'
,
reference
=
'ref3'
,
source_reference
=
'3'
,
source_reference
=
'3'
,
simulation_state
=
'delivered'
,
simulation_state
=
'delivered'
,
causality_value
=
t2
,
causality_value
=
t2
,
...
@@ -1393,6 +1377,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1393,6 +1377,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
t4
=
self
.
_makeOne
(
t4
=
self
.
_makeOne
(
portal_type
=
'Sale Invoice Transaction'
,
portal_type
=
'Sale Invoice Transaction'
,
title
=
'Transaction 4'
,
title
=
'Transaction 4'
,
reference
=
'ref4'
,
source_reference
=
'4'
,
source_reference
=
'4'
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
start_date
=
DateTime
(
2006
,
3
,
1
),
start_date
=
DateTime
(
2006
,
3
,
1
),
...
@@ -1420,6 +1405,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1420,6 +1405,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'detailed_from_date_summary'
]
=
1
request_form
[
'detailed_from_date_summary'
]
=
1
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -1439,15 +1425,13 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1439,15 +1425,13 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'1'
,
Movement_getSpecificReference
=
'1'
,
date
=
DateTime
(
2006
,
2
,
1
),
date
=
DateTime
(
2006
,
2
,
1
),
Movement_getExplanationTitle
=
'Transaction 1'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 1
\
n
ref1'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
100
,
debit_price
=
100
,
credit_price
=
0
,)
credit_price
=
0
,)
self
.
checkLineProperties
(
data_line_list
[
1
],
self
.
checkLineProperties
(
data_line_list
[
1
],
Movement_getSpecificReference
=
'2'
,
Movement_getSpecificReference
=
'2'
,
date
=
DateTime
(
2006
,
2
,
2
),
date
=
DateTime
(
2006
,
2
,
2
),
Movement_getExplanationTitle
=
'Transaction 2'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 2
\
n
ref2'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
200
,
debit_price
=
200
,
credit_price
=
0
,)
credit_price
=
0
,)
self
.
assertTrue
(
line_list
[
-
1
].
isStatLine
())
self
.
assertTrue
(
line_list
[
-
1
].
isStatLine
())
...
@@ -1461,24 +1445,21 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1461,24 +1445,21 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'Previous Balance'
,
Movement_getSpecificReference
=
'Previous Balance'
,
date
=
DateTime
(
2006
,
2
,
25
),
date
=
DateTime
(
2006
,
2
,
25
),
Movement_getExplanationTitle
=
''
,
Movement_getExplanationTitleAndAnalytics
=
None
,
Movement_getMirrorSectionTitle
=
''
,
running_total_price
=
300
,
running_total_price
=
300
,
debit_price
=
300
,
debit_price
=
300
,
credit_price
=
0
,)
credit_price
=
0
,)
self
.
checkLineProperties
(
data_line_list
[
1
],
self
.
checkLineProperties
(
data_line_list
[
1
],
Movement_getSpecificReference
=
'3'
,
Movement_getSpecificReference
=
'3'
,
date
=
DateTime
(
2006
,
2
,
25
,
2
,
3
),
date
=
DateTime
(
2006
,
2
,
25
,
2
,
3
),
Movement_getExplanationTitle
=
'Transaction 3'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 3
\
n
ref3'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
running_total_price
=
100
,
running_total_price
=
100
,
debit_price
=
0
,
debit_price
=
0
,
credit_price
=
200
,)
credit_price
=
200
,)
self
.
checkLineProperties
(
data_line_list
[
2
],
self
.
checkLineProperties
(
data_line_list
[
2
],
Movement_getSpecificReference
=
'4'
,
Movement_getSpecificReference
=
'4'
,
date
=
DateTime
(
2006
,
3
,
1
),
date
=
DateTime
(
2006
,
3
,
1
),
Movement_getExplanationTitle
=
'Transaction 4'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 4
\
n
ref4'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
running_total_price
=
500
,
running_total_price
=
500
,
debit_price
=
400
,
debit_price
=
400
,
credit_price
=
0
,)
credit_price
=
0
,)
...
@@ -1500,6 +1481,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1500,6 +1481,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'detailed_from_date_summary'
]
=
1
request_form
[
'detailed_from_date_summary'
]
=
1
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -1519,8 +1501,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1519,8 +1501,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'1'
,
Movement_getSpecificReference
=
'1'
,
date
=
DateTime
(
2006
,
2
,
1
),
date
=
DateTime
(
2006
,
2
,
1
),
Movement_getExplanationTitle
=
'Transaction 1'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 1
\
n
ref1'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
100
,
debit_price
=
100
,
credit_price
=
0
,)
credit_price
=
0
,)
self
.
assertTrue
(
line_list
[
-
1
].
isStatLine
())
self
.
assertTrue
(
line_list
[
-
1
].
isStatLine
())
...
@@ -1534,16 +1515,13 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1534,16 +1515,13 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'Previous Balance'
,
Movement_getSpecificReference
=
'Previous Balance'
,
date
=
DateTime
(
2006
,
2
,
26
),
date
=
DateTime
(
2006
,
2
,
26
),
Movement_getExplanationTitle
=
''
,
Movement_getMirrorSectionTitle
=
''
,
running_total_price
=
100
,
running_total_price
=
100
,
debit_price
=
300
,
debit_price
=
300
,
credit_price
=
200
,)
credit_price
=
200
,)
self
.
checkLineProperties
(
data_line_list
[
1
],
self
.
checkLineProperties
(
data_line_list
[
1
],
Movement_getSpecificReference
=
'4'
,
Movement_getSpecificReference
=
'4'
,
date
=
DateTime
(
2006
,
3
,
1
),
date
=
DateTime
(
2006
,
3
,
1
),
Movement_getExplanationTitle
=
'Transaction 4'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 4
\
n
ref4'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
running_total_price
=
500
,
running_total_price
=
500
,
debit_price
=
400
,
debit_price
=
400
,
credit_price
=
0
,)
credit_price
=
0
,)
...
@@ -1566,6 +1544,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1566,6 +1544,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'section_category_strict'
]
=
False
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -1580,8 +1559,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1580,8 +1559,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'2'
,
Movement_getSpecificReference
=
'2'
,
date
=
DateTime
(
2006
,
1
,
1
),
date
=
DateTime
(
2006
,
1
,
1
),
Movement_getExplanationTitle
=
'Transaction 2'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 2
\
n
ref2'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
0
,
debit_price
=
0
,
credit_price
=
200
,
credit_price
=
200
,
running_total_price
=-
200
)
running_total_price
=-
200
)
...
@@ -1589,8 +1567,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1589,8 +1567,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
1
],
self
.
checkLineProperties
(
data_line_list
[
1
],
Movement_getSpecificReference
=
'3'
,
Movement_getSpecificReference
=
'3'
,
date
=
DateTime
(
2006
,
2
,
2
),
date
=
DateTime
(
2006
,
2
,
2
),
Movement_getExplanationTitle
=
'Transaction 3'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 3
\
n
ref3'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
0
,
debit_price
=
0
,
credit_price
=
300
,
credit_price
=
300
,
running_total_price
=-
500
)
running_total_price
=-
500
)
...
@@ -1609,6 +1586,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1609,6 +1586,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
t1b
=
self
.
_makeOne
(
t1b
=
self
.
_makeOne
(
portal_type
=
'Sale Invoice Transaction'
,
portal_type
=
'Sale Invoice Transaction'
,
title
=
'Transaction 1b'
,
title
=
'Transaction 1b'
,
reference
=
'ref1b'
,
source_reference
=
'1b'
,
source_reference
=
'1b'
,
simulation_state
=
'delivered'
,
simulation_state
=
'delivered'
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
...
@@ -1629,6 +1607,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1629,6 +1607,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'section_category_strict'
]
=
False
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -1641,8 +1620,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1641,8 +1620,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'Previous Balance'
,
Movement_getSpecificReference
=
'Previous Balance'
,
date
=
DateTime
(
2006
,
2
,
2
),
date
=
DateTime
(
2006
,
2
,
2
),
Movement_getExplanationTitle
=
''
,
Movement_getExplanationTitleAndAnalytics
=
None
,
Movement_getMirrorSectionTitle
=
''
,
debit_price
=
300
,
debit_price
=
300
,
credit_price
=
21
,
credit_price
=
21
,
running_total_price
=
279
)
running_total_price
=
279
)
...
@@ -1650,8 +1628,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1650,8 +1628,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
1
],
self
.
checkLineProperties
(
data_line_list
[
1
],
Movement_getSpecificReference
=
'3'
,
Movement_getSpecificReference
=
'3'
,
date
=
DateTime
(
2006
,
2
,
2
),
date
=
DateTime
(
2006
,
2
,
2
),
Movement_getExplanationTitle
=
'Transaction 3'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 3
\
n
ref3'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
300
,
debit_price
=
300
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=
579
)
running_total_price
=
579
)
...
@@ -1671,6 +1648,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1671,6 +1648,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
t1b
=
self
.
_makeOne
(
t1b
=
self
.
_makeOne
(
portal_type
=
'Sale Invoice Transaction'
,
portal_type
=
'Sale Invoice Transaction'
,
title
=
'Transaction 1b'
,
title
=
'Transaction 1b'
,
reference
=
'ref1b'
,
source_reference
=
'1b'
,
source_reference
=
'1b'
,
simulation_state
=
'delivered'
,
simulation_state
=
'delivered'
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
...
@@ -1690,6 +1668,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1690,6 +1668,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'section_category_strict'
]
=
False
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -1703,8 +1682,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1703,8 +1682,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'Previous Balance'
,
Movement_getSpecificReference
=
'Previous Balance'
,
date
=
DateTime
(
2006
,
1
,
1
),
date
=
DateTime
(
2006
,
1
,
1
),
Movement_getExplanationTitle
=
''
,
Movement_getExplanationTitleAndAnalytics
=
None
,
Movement_getMirrorSectionTitle
=
''
,
debit_price
=
79
,
debit_price
=
79
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=
79
)
running_total_price
=
79
)
...
@@ -1712,8 +1690,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1712,8 +1690,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
1
],
self
.
checkLineProperties
(
data_line_list
[
1
],
Movement_getSpecificReference
=
'2'
,
Movement_getSpecificReference
=
'2'
,
date
=
DateTime
(
2006
,
1
,
1
),
date
=
DateTime
(
2006
,
1
,
1
),
Movement_getExplanationTitle
=
'Transaction 2'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 2
\
n
ref2'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
200
,
debit_price
=
200
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=
279
)
running_total_price
=
279
)
...
@@ -1721,8 +1698,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1721,8 +1698,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
2
],
self
.
checkLineProperties
(
data_line_list
[
2
],
Movement_getSpecificReference
=
'3'
,
Movement_getSpecificReference
=
'3'
,
date
=
DateTime
(
2006
,
2
,
2
),
date
=
DateTime
(
2006
,
2
,
2
),
Movement_getExplanationTitle
=
'Transaction 3'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 3
\
n
ref3'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
300
,
debit_price
=
300
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=
579
)
running_total_price
=
579
)
...
@@ -1746,6 +1722,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1746,6 +1722,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'section_category_strict'
]
=
False
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -1758,8 +1735,6 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1758,8 +1735,6 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'Previous Balance'
,
Movement_getSpecificReference
=
'Previous Balance'
,
date
=
DateTime
(
2006
,
2
,
2
),
date
=
DateTime
(
2006
,
2
,
2
),
Movement_getExplanationTitle
=
''
,
Movement_getMirrorSectionTitle
=
''
,
debit_price
=
0
,
debit_price
=
0
,
credit_price
=
200
,
credit_price
=
200
,
running_total_price
=-
200
)
running_total_price
=-
200
)
...
@@ -1767,8 +1742,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1767,8 +1742,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
1
],
self
.
checkLineProperties
(
data_line_list
[
1
],
Movement_getSpecificReference
=
'3'
,
Movement_getSpecificReference
=
'3'
,
date
=
DateTime
(
2006
,
2
,
2
),
date
=
DateTime
(
2006
,
2
,
2
),
Movement_getExplanationTitle
=
'Transaction 3'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 3
\
n
ref3'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
0
,
debit_price
=
0
,
credit_price
=
300
,
credit_price
=
300
,
running_total_price
=-
500
)
running_total_price
=-
500
)
...
@@ -1792,6 +1766,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1792,6 +1766,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'section_category_strict'
]
=
False
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -1804,8 +1779,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1804,8 +1779,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'1'
,
Movement_getSpecificReference
=
'1'
,
date
=
DateTime
(
2005
,
12
,
31
),
date
=
DateTime
(
2005
,
12
,
31
),
Movement_getExplanationTitle
=
'Transaction 1'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 1
\
n
ref1'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
0
,
debit_price
=
0
,
credit_price
=
100
,
credit_price
=
100
,
running_total_price
=-
100
)
running_total_price
=-
100
)
...
@@ -1813,8 +1787,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1813,8 +1787,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
1
],
self
.
checkLineProperties
(
data_line_list
[
1
],
Movement_getSpecificReference
=
'2'
,
Movement_getSpecificReference
=
'2'
,
date
=
DateTime
(
2006
,
1
,
1
),
date
=
DateTime
(
2006
,
1
,
1
),
Movement_getExplanationTitle
=
'Transaction 2'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 2
\
n
ref2'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
0
,
debit_price
=
0
,
credit_price
=
200
,
credit_price
=
200
,
running_total_price
=-
300
)
running_total_price
=-
300
)
...
@@ -1822,8 +1795,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1822,8 +1795,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
2
],
self
.
checkLineProperties
(
data_line_list
[
2
],
Movement_getSpecificReference
=
'3'
,
Movement_getSpecificReference
=
'3'
,
date
=
DateTime
(
2006
,
2
,
2
),
date
=
DateTime
(
2006
,
2
,
2
),
Movement_getExplanationTitle
=
'Transaction 3'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 3
\
n
ref3'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
0
,
debit_price
=
0
,
credit_price
=
300
,
credit_price
=
300
,
running_total_price
=-
600
)
running_total_price
=-
600
)
...
@@ -1848,6 +1820,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1848,6 +1820,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'section_category_strict'
]
=
False
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -1858,17 +1831,10 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1858,17 +1831,10 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
assertEqual
(
1
,
len
(
data_line_list
))
self
.
assertEqual
(
1
,
len
(
data_line_list
))
line
=
data_line_list
[
0
]
line
=
data_line_list
[
0
]
# mirror section title is not in the list of columns, as a mirror section
# is choosen in the dialog
self
.
assertEqual
(
line
.
column_id_list
,
[
'Movement_getSpecificReference'
,
'date'
,
'Movement_getExplanationTitle'
,
'Movement_getExplanationReference'
,
'debit_price'
,
'credit_price'
,
'running_total_price'
])
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'4'
,
Movement_getSpecificReference
=
'4'
,
date
=
DateTime
(
2006
,
2
,
2
,
0
,
3
),
date
=
DateTime
(
2006
,
2
,
2
,
0
,
3
),
Movement_getExplanationTitle
=
'Transaction
4'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 4
\
n
ref
4'
,
debit_price
=
400
,
debit_price
=
400
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=
400
)
running_total_price
=
400
)
...
@@ -1890,6 +1856,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1890,6 +1856,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'section_category_strict'
]
=
False
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'stopped'
,
'confirmed'
]
request_form
[
'simulation_state'
]
=
[
'stopped'
,
'confirmed'
]
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -1902,8 +1869,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1902,8 +1869,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'7'
,
Movement_getSpecificReference
=
'7'
,
date
=
DateTime
(
2006
,
2
,
2
,
0
,
6
),
date
=
DateTime
(
2006
,
2
,
2
,
0
,
6
),
Movement_getExplanationTitle
=
'Transaction 7'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 7
\
n
ref7'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
700
,
debit_price
=
700
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=
700
)
running_total_price
=
700
)
...
@@ -1951,6 +1917,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1951,6 +1917,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'section_category_strict'
]
=
False
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -1963,8 +1930,6 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1963,8 +1930,6 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'1'
,
Movement_getSpecificReference
=
'1'
,
date
=
DateTime
(
2006
,
2
,
1
,
0
,
1
),
date
=
DateTime
(
2006
,
2
,
1
,
0
,
1
),
Movement_getExplanationTitle
=
'Transaction 1'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=-
100
,
debit_price
=-
100
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=-
100
)
running_total_price
=-
100
)
...
@@ -1972,8 +1937,6 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -1972,8 +1937,6 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
data_line_list
[
1
],
self
.
checkLineProperties
(
data_line_list
[
1
],
Movement_getSpecificReference
=
'2'
,
Movement_getSpecificReference
=
'2'
,
date
=
DateTime
(
2006
,
2
,
1
,
0
,
2
),
date
=
DateTime
(
2006
,
2
,
1
,
0
,
2
),
Movement_getExplanationTitle
=
'Transaction 2'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
0
,
debit_price
=
0
,
credit_price
=-
200
,
credit_price
=-
200
,
running_total_price
=
100
)
running_total_price
=
100
)
...
@@ -2011,6 +1974,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -2011,6 +1974,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'section_category_strict'
]
=
False
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -2030,16 +1994,12 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -2030,16 +1994,12 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
line
,
self
.
checkLineProperties
(
line
,
Movement_getSpecificReference
=
'Source Reference'
,
Movement_getSpecificReference
=
'Source Reference'
,
date
=
DateTime
(
2006
,
2
,
1
),
date
=
DateTime
(
2006
,
2
,
1
),
Movement_getExplanationTitle
=
'Transaction 1'
,
Movement_getMirrorSectionTitle
=
self
.
section
.
getTitle
(),
debit_price
=
0
,
debit_price
=
0
,
credit_price
=
100
,)
credit_price
=
100
,)
else
:
else
:
self
.
checkLineProperties
(
line
,
self
.
checkLineProperties
(
line
,
Movement_getSpecificReference
=
'Destination Reference'
,
Movement_getSpecificReference
=
'Destination Reference'
,
date
=
DateTime
(
2006
,
2
,
1
),
date
=
DateTime
(
2006
,
2
,
1
),
Movement_getExplanationTitle
=
'Transaction 1'
,
Movement_getMirrorSectionTitle
=
self
.
section
.
getTitle
(),
debit_price
=
100
,
debit_price
=
100
,
credit_price
=
0
,)
credit_price
=
0
,)
...
@@ -2054,6 +2014,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -2054,6 +2014,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
t1
=
self
.
_makeOne
(
t1
=
self
.
_makeOne
(
portal_type
=
'Accounting Transaction'
,
portal_type
=
'Accounting Transaction'
,
title
=
'Transaction 1'
,
title
=
'Transaction 1'
,
reference
=
'ref1'
,
source_reference
=
'1'
,
source_reference
=
'1'
,
simulation_state
=
'delivered'
,
simulation_state
=
'delivered'
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
...
@@ -2066,6 +2027,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -2066,6 +2027,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
t2
=
self
.
_makeOne
(
t2
=
self
.
_makeOne
(
portal_type
=
'Accounting Transaction'
,
portal_type
=
'Accounting Transaction'
,
title
=
'Transaction 2'
,
title
=
'Transaction 2'
,
reference
=
'ref2'
,
source_reference
=
'2'
,
source_reference
=
'2'
,
source_section_value
=
self
.
main_section
,
source_section_value
=
self
.
main_section
,
simulation_state
=
'delivered'
,
simulation_state
=
'delivered'
,
...
@@ -2085,6 +2047,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -2085,6 +2047,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'section_category_strict'
]
=
False
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -2094,19 +2057,11 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -2094,19 +2057,11 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
data_line_list
=
[
l
for
l
in
line_list
if
l
.
isDataLine
()]
data_line_list
=
[
l
for
l
in
line_list
if
l
.
isDataLine
()]
self
.
assertEqual
(
2
,
len
(
data_line_list
))
self
.
assertEqual
(
2
,
len
(
data_line_list
))
self
.
assertEqual
(
data_line_list
[
0
].
column_id_list
,
[
'Movement_getSpecificReference'
,
'date'
,
'Movement_getExplanationTitle'
,
'section_title'
,
'Movement_getMirrorSectionTitle'
,
'Movement_getExplanationReference'
,
'debit_price'
,
'credit_price'
,
'running_total_price'
])
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'1'
,
Movement_getSpecificReference
=
'1'
,
date
=
DateTime
(
2006
,
2
,
1
),
date
=
DateTime
(
2006
,
2
,
1
),
section_title
=
'My Organisation'
,
section_title
=
'My Organisation'
,
Movement_getExplanationTitle
=
'Transaction 1'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 1
\
n
ref1'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
100
,
debit_price
=
100
,
credit_price
=
0
,
credit_price
=
0
,
running_total_price
=
100
)
running_total_price
=
100
)
...
@@ -2115,8 +2070,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -2115,8 +2070,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
Movement_getSpecificReference
=
'2'
,
Movement_getSpecificReference
=
'2'
,
date
=
DateTime
(
2006
,
2
,
1
,
0
,
1
),
date
=
DateTime
(
2006
,
2
,
1
,
0
,
1
),
section_title
=
'My Master Organisation'
,
section_title
=
'My Master Organisation'
,
Movement_getExplanationTitle
=
'Transaction 2'
,
Movement_getExplanationTitleAndAnalytics
=
'Transaction 2
\
n
ref2'
,
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
0
,
debit_price
=
0
,
credit_price
=
200
,
credit_price
=
200
,
running_total_price
=-
100
)
running_total_price
=-
100
)
...
@@ -2138,6 +2092,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -2138,6 +2092,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'project'
]
=
self
.
project_1
.
getRelativeUrl
()
request_form
[
'project'
]
=
self
.
project_1
.
getRelativeUrl
()
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -2149,9 +2104,9 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -2149,9 +2104,9 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
assertEqual
(
1
,
len
(
data_line_list
))
self
.
assertEqual
(
1
,
len
(
data_line_list
))
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'1'
,
Movement_getSpecificReference
=
'1'
,
Movement_getExplanationTitle
=
'Function a Project 1'
,
Movement_getExplanationTitleAndAnalytics
=
'Function a Project 1
\
n
FaP1'
,
date
=
DateTime
(
2006
,
2
,
2
),
date
=
DateTime
(
2006
,
2
,
2
),
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
500
,
credit_price
=
0
,
running_total_price
=
500
,
)
debit_price
=
500
,
credit_price
=
0
,
running_total_price
=
500
,
)
self
.
assertTrue
(
line_list
[
-
1
].
isStatLine
())
self
.
assertTrue
(
line_list
[
-
1
].
isStatLine
())
self
.
checkLineProperties
(
line_list
[
-
1
],
debit_price
=
500
,
credit_price
=
0
)
self
.
checkLineProperties
(
line_list
[
-
1
],
debit_price
=
500
,
credit_price
=
0
)
...
@@ -2171,6 +2126,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -2171,6 +2126,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'project'
]
=
'None'
request_form
[
'project'
]
=
'None'
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -2182,9 +2138,9 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -2182,9 +2138,9 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
assertEqual
(
1
,
len
(
data_line_list
))
self
.
assertEqual
(
1
,
len
(
data_line_list
))
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getSpecificReference
=
'3'
,
Movement_getSpecificReference
=
'3'
,
Movement_getExplanationTitle
=
'No function no project'
,
Movement_getExplanationTitleAndAnalytics
=
'No function no project
\
n
nono'
,
date
=
DateTime
(
2006
,
2
,
2
),
date
=
DateTime
(
2006
,
2
,
2
),
Movement_getMirrorSectionTitle
=
'Client 1'
,
debit_price
=
700
,
credit_price
=
0
,
running_total_price
=
700
,
)
debit_price
=
700
,
credit_price
=
0
,
running_total_price
=
700
,
)
self
.
assertTrue
(
line_list
[
-
1
].
isStatLine
())
self
.
assertTrue
(
line_list
[
-
1
].
isStatLine
())
self
.
checkLineProperties
(
line_list
[
-
1
],
debit_price
=
700
,
credit_price
=
0
)
self
.
checkLineProperties
(
line_list
[
-
1
],
debit_price
=
700
,
credit_price
=
0
)
...
@@ -4342,6 +4298,7 @@ class TestAccountingReportsWithAnalytic(AccountingTestCase, ERP5ReportTestCase):
...
@@ -4342,6 +4298,7 @@ class TestAccountingReportsWithAnalytic(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'section_category_strict'
]
=
False
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'hide_analytic'
]
=
False
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -4352,33 +4309,21 @@ class TestAccountingReportsWithAnalytic(AccountingTestCase, ERP5ReportTestCase):
...
@@ -4352,33 +4309,21 @@ class TestAccountingReportsWithAnalytic(AccountingTestCase, ERP5ReportTestCase):
data_line_list
=
[
l
for
l
in
line_list
if
l
.
isDataLine
()]
data_line_list
=
[
l
for
l
in
line_list
if
l
.
isDataLine
()]
self
.
assertEqual
(
3
,
len
(
data_line_list
))
self
.
assertEqual
(
3
,
len
(
data_line_list
))
line
=
data_line_list
[
0
]
self
.
assertEqual
(
line
.
column_id_list
,
[
'Movement_getSpecificReference'
,
'date'
,
'Movement_getExplanationTitle'
,
'function'
,
'project'
,
'product_line_translated_title'
,
'Movement_getMirrorSectionTitle'
,
'Movement_getExplanationReference'
,
'debit_price'
,
'credit_price'
,
'running_total_price'
])
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
project
=
'P1 - Project 1'
,
Movement_getExplanationTitleAndAnalytics
=
'''Detailed Transaction
function
=
'a'
,
DT, a, P1 - Project 1, pl1'''
,
product_line_translated_title
=
'pl1'
,
debit_price
=
0
,
debit_price
=
0
,
credit_price
=
300
,
credit_price
=
300
,
running_total_price
=-
300
)
running_total_price
=-
300
)
self
.
checkLineProperties
(
data_line_list
[
1
],
self
.
checkLineProperties
(
data_line_list
[
1
],
project
=
'P1 - Project 1'
,
Movement_getExplanationTitleAndAnalytics
=
'''Detailed Transaction
function
=
'b'
,
DT, b, P1 - Project 1, pl1'''
,
product_line_translated_title
=
'pl1'
,
debit_price
=
0
,
debit_price
=
0
,
credit_price
=
500
,
credit_price
=
500
,
running_total_price
=-
800
)
running_total_price
=-
800
)
self
.
checkLineProperties
(
data_line_list
[
2
],
self
.
checkLineProperties
(
data_line_list
[
2
],
project
=
'P2 - Project 2'
,
Movement_getExplanationTitleAndAnalytics
=
'''Detailed Transaction
function
=
'b'
,
DT, b, P2 - Project 2'''
,
product_line_translated_title
=
None
,
debit_price
=
0
,
debit_price
=
0
,
credit_price
=
700
,
credit_price
=
700
,
running_total_price
=-
1500
)
running_total_price
=-
1500
)
...
@@ -4396,6 +4341,7 @@ class TestAccountingReportsWithAnalytic(AccountingTestCase, ERP5ReportTestCase):
...
@@ -4396,6 +4341,7 @@ class TestAccountingReportsWithAnalytic(AccountingTestCase, ERP5ReportTestCase):
request_form
[
'section_category_strict'
]
=
False
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'hide_analytic'
]
=
True
request_form
[
'hide_analytic'
]
=
True
request_form
[
'export'
]
=
False
report_section_list
=
self
.
getReportSectionList
(
report_section_list
=
self
.
getReportSectionList
(
self
.
portal
.
accounting_module
,
self
.
portal
.
accounting_module
,
...
@@ -4406,14 +4352,6 @@ class TestAccountingReportsWithAnalytic(AccountingTestCase, ERP5ReportTestCase):
...
@@ -4406,14 +4352,6 @@ class TestAccountingReportsWithAnalytic(AccountingTestCase, ERP5ReportTestCase):
data_line_list
=
[
l
for
l
in
line_list
if
l
.
isDataLine
()]
data_line_list
=
[
l
for
l
in
line_list
if
l
.
isDataLine
()]
self
.
assertEqual
(
1
,
len
(
data_line_list
))
self
.
assertEqual
(
1
,
len
(
data_line_list
))
line
=
data_line_list
[
0
]
self
.
assertEqual
(
line
.
column_id_list
,
[
'Movement_getSpecificReference'
,
'date'
,
'Movement_getExplanationTitle'
,
'Movement_getMirrorSectionTitle'
,
'Movement_getExplanationReference'
,
'debit_price'
,
'credit_price'
,
'running_total_price'
])
self
.
checkLineProperties
(
data_line_list
[
0
],
self
.
checkLineProperties
(
data_line_list
[
0
],
debit_price
=
0
,
debit_price
=
0
,
credit_price
=
1500
,
credit_price
=
1500
,
...
@@ -4423,6 +4361,121 @@ class TestAccountingReportsWithAnalytic(AccountingTestCase, ERP5ReportTestCase):
...
@@ -4423,6 +4361,121 @@ class TestAccountingReportsWithAnalytic(AccountingTestCase, ERP5ReportTestCase):
self
.
assertTrue
(
line_list
[
-
1
].
isStatLine
())
self
.
assertTrue
(
line_list
[
-
1
].
isStatLine
())
self
.
checkLineProperties
(
line_list
[
-
1
],
debit_price
=
0
,
credit_price
=
1500
)
self
.
checkLineProperties
(
line_list
[
-
1
],
debit_price
=
0
,
credit_price
=
1500
)
def
testAccountStatementAnalyticsExport
(
self
):
request_form
=
self
.
portal
.
REQUEST
.
form
request_form
[
'node'
]
=
\
self
.
portal
.
account_module
.
goods_sales
.
getRelativeUrl
()
request_form
[
'at_date'
]
=
DateTime
(
2006
,
2
,
2
)
request_form
[
'section_category'
]
=
'group/demo_group/sub1'
request_form
[
'section_category_strict'
]
=
False
request_form
[
'simulation_state'
]
=
[
'delivered'
]
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
True
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
(
3
,
len
(
data_line_list
))
self
.
assertEqual
(
[
'Movement_getNodeGapId'
,
'node_translated_title'
,
'section_title'
,
'mirror_section_title'
,
'date'
,
'modification_date'
,
'Movement_getSpecificReference'
,
'Movement_getExplanationTranslatedPortalType'
,
'Movement_getExplanationTitle'
,
'Movement_getExplanationReference'
,
# those are analytics columns
'function'
,
'product_line_translated_title'
,
'debit_price'
,
'credit_price'
,
'total_price'
,
'Movement_getSectionPriceCurrency'
,
'debit'
,
'credit'
,
'total_quantity'
,
'resource_reference'
,
'Movement_getPaymentTitle'
,
'payment_mode_translated_title'
,
'grouping_reference'
,
'grouping_date'
,
'getTranslatedSimulationStateTitle'
],
data_line_list
[
0
].
column_id_list
)
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getNodeGapId
=
'7'
,
node_translated_title
=
'Goods Sales'
,
section_title
=
'My Organisation'
,
mirror_section_title
=
'Client 1'
,
date
=
DateTime
(
2006
,
2
,
2
),
Movement_getSpecificReference
=
'1'
,
Movement_getExplanationTranslatedPortalType
=
'Sale Invoice Transaction'
,
Movement_getExplanationTitle
=
'Detailed Transaction'
,
Movement_getExplanationReference
=
'DT'
,
function
=
'a'
,
product_line_translated_title
=
'pl1'
,
debit_price
=
0
,
credit_price
=
300
,
total_price
=-
300
,
Movement_getSectionPriceCurrency
=
'EUR'
,
debit
=
0
,
credit
=
300
,
total_quantity
=-
300
,
resource_reference
=
'EUR'
,
Movement_getPaymentTitle
=
None
,
payment_mode_translated_title
=
None
,
grouping_reference
=
None
,
grouping_date
=
None
,
getTranslatedSimulationStateTitle
=
'Closed'
)
self
.
checkLineProperties
(
data_line_list
[
1
],
Movement_getNodeGapId
=
'7'
,
node_translated_title
=
'Goods Sales'
,
section_title
=
'My Organisation'
,
mirror_section_title
=
'Client 1'
,
date
=
DateTime
(
2006
,
2
,
2
),
Movement_getSpecificReference
=
'1'
,
Movement_getExplanationTranslatedPortalType
=
'Sale Invoice Transaction'
,
Movement_getExplanationTitle
=
'Detailed Transaction'
,
Movement_getExplanationReference
=
'DT'
,
function
=
'b'
,
product_line_translated_title
=
'pl1'
,
debit_price
=
0
,
credit_price
=
500
,
total_price
=-
500
,
Movement_getSectionPriceCurrency
=
'EUR'
,
debit
=
0
,
credit
=
500
,
total_quantity
=-
500
,
resource_reference
=
'EUR'
,
Movement_getPaymentTitle
=
None
,
payment_mode_translated_title
=
None
,
grouping_reference
=
None
,
grouping_date
=
None
,
getTranslatedSimulationStateTitle
=
'Closed'
)
self
.
checkLineProperties
(
data_line_list
[
2
],
Movement_getNodeGapId
=
'7'
,
node_translated_title
=
'Goods Sales'
,
section_title
=
'My Organisation'
,
mirror_section_title
=
'Client 1'
,
date
=
DateTime
(
2006
,
2
,
2
),
Movement_getSpecificReference
=
'1'
,
Movement_getExplanationTranslatedPortalType
=
'Sale Invoice Transaction'
,
Movement_getExplanationTitle
=
'Detailed Transaction'
,
Movement_getExplanationReference
=
'DT'
,
function
=
'b'
,
product_line_translated_title
=
None
,
debit_price
=
0
,
credit_price
=
700
,
total_price
=-
700
,
Movement_getSectionPriceCurrency
=
'EUR'
,
debit
=
0
,
credit
=
700
,
total_quantity
=-
700
,
resource_reference
=
'EUR'
,
Movement_getPaymentTitle
=
None
,
payment_mode_translated_title
=
None
,
grouping_reference
=
None
,
grouping_date
=
None
,
getTranslatedSimulationStateTitle
=
'Closed'
)
# There is no stat line in export
stat_line
=
line_list
[
-
1
]
self
.
assertFalse
(
line_list
[
-
1
].
isStatLine
())
def
testGeneralLedgerAnalyticsShown
(
self
):
def
testGeneralLedgerAnalyticsShown
(
self
):
self
.
project_1
.
validate
()
self
.
project_1
.
validate
()
self
.
project_2
.
validate
()
self
.
project_2
.
validate
()
...
...
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