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
Alain Takoudjou
erp5
Commits
959ed281
Commit
959ed281
authored
May 27, 2016
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_accounting: adds filtering on ledger for Account Statement Report
parent
ae08f36f
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
222 additions
and
2 deletions
+222
-2
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountStatementReportSectionList.py
...ing/AccountModule_getAccountStatementReportSectionList.py
+3
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewAccountStatementReport.xml
...5_accounting/AccountModule_viewAccountStatementReport.xml
+1
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewAccountStatementReport/your_ledger.xml
.../AccountModule_viewAccountStatementReport/your_ledger.xml
+84
-0
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_ledger.xml
...ntModule_viewAccountStatementReportDialog/your_ledger.xml
+84
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getNotGroupedAccountingTransactionList.py
...ounting/Account_getNotGroupedAccountingTransactionList.py
+2
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.py
...kins/erp5_accounting/Node_getAccountingTransactionList.py
+3
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingBalance.py
...ortal_skins/erp5_accounting/Node_statAccountingBalance.py
+3
-0
product/ERP5/tests/testAccountingReports.py
product/ERP5/tests/testAccountingReports.py
+41
-2
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountStatementReportSectionList.py
View file @
959ed281
...
@@ -24,6 +24,7 @@ mirror_section = request.get('mirror_section', None)
...
@@ -24,6 +24,7 @@ mirror_section = request.get('mirror_section', None)
payment
=
request
.
get
(
'payment'
,
None
)
payment
=
request
.
get
(
'payment'
,
None
)
function
=
request
.
get
(
'function'
,
None
)
function
=
request
.
get
(
'function'
,
None
)
funding
=
request
.
get
(
'funding'
,
None
)
funding
=
request
.
get
(
'funding'
,
None
)
ledger
=
request
.
get
(
'ledger'
,
None
)
project
=
request
.
get
(
'project'
,
None
)
project
=
request
.
get
(
'project'
,
None
)
simulation_state
=
request
[
'simulation_state'
]
simulation_state
=
request
[
'simulation_state'
]
hide_analytic
=
request
[
'hide_analytic'
]
hide_analytic
=
request
[
'hide_analytic'
]
...
@@ -83,6 +84,8 @@ if mirror_section:
...
@@ -83,6 +84,8 @@ if mirror_section:
params
[
'mirror_section_uid'
]
=
traverse
(
mirror_section
).
getUid
()
params
[
'mirror_section_uid'
]
=
traverse
(
mirror_section
).
getUid
()
if
parent_portal_type
:
if
parent_portal_type
:
params
[
'parent_portal_type'
]
=
parent_portal_type
params
[
'parent_portal_type'
]
=
parent_portal_type
if
ledger
:
params
[
'ledger'
]
=
ledger
analytic_column_list
=
()
analytic_column_list
=
()
if
hide_analytic
:
if
hide_analytic
:
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewAccountStatementReport.xml
View file @
959ed281
...
@@ -101,6 +101,7 @@
...
@@ -101,6 +101,7 @@
<string>
your_payment
</string>
<string>
your_payment
</string>
<string>
your_node
</string>
<string>
your_node
</string>
<string>
your_portal_type
</string>
<string>
your_portal_type
</string>
<string>
your_ledger
</string>
<string>
your_simulation_state
</string>
<string>
your_simulation_state
</string>
<string>
your_report_date
</string>
<string>
your_report_date
</string>
</list>
</list>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewAccountStatementReport/your_ledger.xml
0 → 100644
View file @
959ed281
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_ledger
</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>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
your_ledger
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
AccountModule_viewReportFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewAccountStatementReportDialog.xml
View file @
959ed281
...
@@ -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_ledger
</string>
<string>
your_export
</string>
<string>
your_export
</string>
</list>
</list>
</value>
</value>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewAccountStatementReportDialog/your_ledger.xml
0 → 100644
View file @
959ed281
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_ledger
</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>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
your_ledger
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
AccountModule_viewDialogFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getNotGroupedAccountingTransactionList.py
View file @
959ed281
...
@@ -36,6 +36,8 @@ if project_uid:
...
@@ -36,6 +36,8 @@ if project_uid:
inventory_query
[
'project_uid'
]
=
project_uid
inventory_query
[
'project_uid'
]
=
project_uid
if
function
:
if
function
:
inventory_query
[
'function_category'
]
=
function
inventory_query
[
'function_category'
]
=
function
if
params
.
get
(
'ledger'
,
None
):
inventory_query
[
'ledger'
]
=
params
.
get
(
'ledger'
)
if
'parent_portal_type'
in
params
:
if
'parent_portal_type'
in
params
:
portal_type_list
=
params
[
'parent_portal_type'
]
portal_type_list
=
params
[
'parent_portal_type'
]
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.py
View file @
959ed281
...
@@ -22,6 +22,9 @@ if kw.get('node_uid'):
...
@@ -22,6 +22,9 @@ if kw.get('node_uid'):
if
kw
.
get
(
'mirror_section_uid'
):
if
kw
.
get
(
'mirror_section_uid'
):
params
[
'mirror_section_uid'
]
=
kw
[
'mirror_section_uid'
]
params
[
'mirror_section_uid'
]
=
kw
[
'mirror_section_uid'
]
if
kw
.
get
(
'ledger'
,
None
):
params
[
'ledger'
]
=
kw
[
'ledger'
]
category_uid_list
=
(
'payment_uid'
,
'project_uid'
,
'funding_uid'
,
category_uid_list
=
(
'payment_uid'
,
'project_uid'
,
'funding_uid'
,
'function_uid'
,
'payment_request_uid'
,
'default_aggregate_uid'
)
'function_uid'
,
'payment_request_uid'
,
'default_aggregate_uid'
)
for
category_uid
in
category_uid_list
:
for
category_uid
in
category_uid_list
:
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_statAccountingBalance.py
View file @
959ed281
...
@@ -65,6 +65,9 @@ if not 'parent_portal_type' in params:
...
@@ -65,6 +65,9 @@ if not 'parent_portal_type' in params:
# Remove unsupported inventory API parameters
# Remove unsupported inventory API parameters
params
.
pop
(
'detailed_from_date_summary'
,
None
)
params
.
pop
(
'detailed_from_date_summary'
,
None
)
if
kw
.
get
(
'ledger'
,
None
):
params
[
'ledger'
]
=
kw
.
get
(
'ledger'
)
period_start_date
=
params
.
pop
(
'period_start_date'
,
None
)
period_start_date
=
params
.
pop
(
'period_start_date'
,
None
)
if
period_start_date
and
params
.
get
(
'node_uid'
):
if
period_start_date
and
params
.
get
(
'node_uid'
):
# find the node for this node_uid
# find the node for this node_uid
...
...
product/ERP5/tests/testAccountingReports.py
View file @
959ed281
...
@@ -798,8 +798,8 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -798,8 +798,8 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
dict
(
source_value
=
account_module
.
goods_sales
,
dict
(
source_value
=
account_module
.
goods_sales
,
source_credit
=
300.0
)))
source_credit
=
300.0
)))
def
createLedgerDataSet
(
self
):
@
UnrestrictedMethod
# create some ledgers
def
createLedgerCategory
(
self
):
ledger
=
self
.
portal
.
portal_categories
.
ledger
ledger
=
self
.
portal
.
portal_categories
.
ledger
self
.
accounting_ledger
=
ledger
.
get
(
'accounting'
,
None
)
self
.
accounting_ledger
=
ledger
.
get
(
'accounting'
,
None
)
if
self
.
accounting_ledger
is
None
:
if
self
.
accounting_ledger
is
None
:
...
@@ -810,10 +810,15 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -810,10 +810,15 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
if
self
.
accounting_ledger
.
get
(
'detailed'
,
None
)
is
None
:
if
self
.
accounting_ledger
.
get
(
'detailed'
,
None
)
is
None
:
self
.
accounting_ledger
.
newContent
(
portal_type
=
'Category'
,
id
=
'detailed'
)
self
.
accounting_ledger
.
newContent
(
portal_type
=
'Category'
,
id
=
'detailed'
)
def
createLedgerDataSet
(
self
):
# create some ledgers
self
.
createLedgerCategory
()
account_module
=
self
.
portal
.
account_module
account_module
=
self
.
portal
.
account_module
self
.
_makeOne
(
self
.
_makeOne
(
portal_type
=
'Sale Invoice Transaction'
,
portal_type
=
'Sale Invoice Transaction'
,
title
=
'Ledger detailed'
,
title
=
'Ledger detailed'
,
reference
=
'lad'
,
simulation_state
=
'delivered'
,
simulation_state
=
'delivered'
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
ledger
=
'accounting/detailed'
,
ledger
=
'accounting/detailed'
,
...
@@ -830,6 +835,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -830,6 +835,7 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
_makeOne
(
self
.
_makeOne
(
portal_type
=
'Sale Invoice Transaction'
,
portal_type
=
'Sale Invoice Transaction'
,
title
=
'Ledger general'
,
title
=
'Ledger general'
,
reference
=
'lag'
,
simulation_state
=
'delivered'
,
simulation_state
=
'delivered'
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
destination_section_value
=
self
.
organisation_module
.
client_1
,
ledger
=
'accounting/general'
,
ledger
=
'accounting/general'
,
...
@@ -2193,6 +2199,39 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
...
@@ -2193,6 +2199,39 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
checkLineProperties
(
line_list
[
-
1
],
debit_price
=
700
,
credit_price
=
0
)
self
.
checkLineProperties
(
line_list
[
-
1
],
debit_price
=
700
,
credit_price
=
0
)
def
testAccountStatementLedger
(
self
):
# test account statement on a ledger
self
.
createLedgerDataSet
()
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
[
'ledger'
]
=
'ledger/accounting/general'
request_form
[
'hide_analytic'
]
=
False
request_form
[
'export'
]
=
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_getExplanationTitleAndAnalytics
=
'Ledger general
\
n
lag'
,
date
=
DateTime
(
2006
,
2
,
2
),
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
testTrialBalance
(
self
):
def
testTrialBalance
(
self
):
# Simple test of trial balance
# Simple test of trial balance
# we will use the same data set as account statement
# 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