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
alecs_myu
erp5
Commits
fe70bd53
Commit
fe70bd53
authored
Jun 08, 2016
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_accounting: adds filtering on ledger for General Ledger Report
parent
b46c3772
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
227 additions
and
1 deletion
+227
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.py
...unting/AccountModule_getGeneralLedgerReportSectionList.py
+10
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerSummary.py
.../erp5_accounting/AccountModule_getGeneralLedgerSummary.py
+2
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerSummary.xml
...erp5_accounting/AccountModule_getGeneralLedgerSummary.xml
+1
-1
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReport.xml
...erp5_accounting/AccountModule_viewGeneralLedgerReport.xml
+1
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReport/your_ledger.xml
...ing/AccountModule_viewGeneralLedgerReport/your_ledger.xml
+84
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog.xml
...ccounting/AccountModule_viewGeneralLedgerReportDialog.xml
+1
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog/your_ledger.xml
...countModule_viewGeneralLedgerReportDialog/your_ledger.xml
+84
-0
product/ERP5/tests/testAccountingReports.py
product/ERP5/tests/testAccountingReports.py
+44
-0
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.py
View file @
fe70bd53
...
...
@@ -79,6 +79,16 @@ if mirror_section:
mirror_section_uid
=
portal
.
restrictedTraverse
(
mirror_section
).
getUid
()
params
[
'mirror_section_uid'
]
=
mirror_section_uid
ledger
=
request
.
get
(
'ledger'
,
None
)
if
ledger
:
if
not
isinstance
(
ledger
,
list
):
# Allows the generation of reports on different ledgers as the same time
ledger
=
[
ledger
]
ledger_value_list
=
[
cat_tool
.
restrictedTraverse
(
ledger_category
,
None
)
for
ledger_category
in
ledger
]
for
ledger_value
in
ledger_value_list
:
params
.
setdefault
(
'ledger_uid'
,
[]).
append
(
ledger_value
.
getUid
())
default_selection_params
=
params
.
copy
()
default_selection_params
[
'period_start_date'
]
=
period_start_date
default_selection_params
[
'movement_portal_type'
]
=
portal
.
getPortalAccountingMovementTypeList
()
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerSummary.py
View file @
fe70bd53
...
...
@@ -20,6 +20,8 @@ if mirror_section_category:
inventory_kw
[
'mirror_section_category'
]
=
mirror_section_category
if
mirror_section_uid
:
inventory_kw
[
'mirror_section_uid'
]
=
mirror_section_uid
if
ledger_uid
:
inventory_kw
[
'ledger_uid'
]
=
ledger_uid
if
node_category
:
# XXX if node category is passed, income or balance accounts are not
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerSummary.xml
View file @
fe70bd53
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
section_uid, simulation_state, at_date, period_start_date, precision, node_category=None, function_category=None, function_uid=None, funding_category=None, funding_uid=None, project_uid=None, from_date=\'ignored\', mirror_section_category=None, mirror_section_uid=None, **kw
</string>
</value>
<value>
<string>
section_uid, simulation_state, at_date, period_start_date, precision, node_category=None, function_category=None, function_uid=None, funding_category=None, funding_uid=None, project_uid=None,
ledger_uid=None,
from_date=\'ignored\', mirror_section_category=None, mirror_section_uid=None, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReport.xml
View file @
fe70bd53
...
...
@@ -101,6 +101,7 @@
<string>
your_mirror_section
</string>
<string>
your_gap_list
</string>
<string>
your_gap_root
</string>
<string>
your_ledger
</string>
<string>
your_simulation_state
</string>
<string>
your_report_date
</string>
</list>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReport/your_ledger.xml
0 → 100644
View file @
fe70bd53
<?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_viewGeneralLedgerReportDialog.xml
View file @
fe70bd53
...
...
@@ -112,6 +112,7 @@
<list>
<string>
your_simulation_state
</string>
<string>
your_mirror_section_category_list
</string>
<string>
your_ledger
</string>
<string>
your_export
</string>
</list>
</value>
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog/your_ledger.xml
0 → 100644
View file @
fe70bd53
<?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>
product/ERP5/tests/testAccountingReports.py
View file @
fe70bd53
...
...
@@ -4214,6 +4214,50 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
self
.
assertEqual
(
1
,
len
(
data_line_list
))
self
.
checkLineProperties
(
data_line_list
[
0
],
debit_price
=
500
,
credit_price
=
500
)
def
testGeneralLedgerLedger
(
self
):
# general ledger restricted to a ledger
self
.
createLedgerDataSet
()
request_form
=
self
.
portal
.
REQUEST
.
form
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_viewGeneralLedgerReport'
)
self
.
assertEqual
(
3
,
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
)
line_list
=
self
.
getListBoxLineList
(
report_section_list
[
1
])
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
=
0
,
credit_price
=
500
,
running_total_price
=-
500
,
)
self
.
assertTrue
(
line_list
[
-
1
].
isStatLine
())
self
.
checkLineProperties
(
line_list
[
-
1
],
debit_price
=
0
,
credit_price
=
500
)
line_list
=
self
.
getListBoxLineList
(
report_section_list
[
2
])
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
],
debit_price
=
500
,
credit_price
=
500
)
def
testGeneralLedgerMirrorSectionRole
(
self
):
# general ledger restricted to a mirror section role
self
.
createMirrorSectionRoleDataSet
()
...
...
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