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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Georgios Dagkakis
erp5
Commits
eeb263f5
Commit
eeb263f5
authored
Dec 13, 2019
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounting: add Financial Section column in GL export mode
parent
0be4a159
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
5 deletions
+87
-5
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerColumnItemList.py
...ccounting/AccountModule_getGeneralLedgerColumnItemList.py
+1
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getNodeFinancialSectionTitle.py
.../erp5_accounting/Movement_getNodeFinancialSectionTitle.py
+11
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getNodeFinancialSectionTitle.xml
...erp5_accounting/Movement_getNodeFinancialSectionTitle.xml
+62
-0
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.py
...kins/erp5_accounting/Node_getAccountingTransactionList.py
+2
-1
product/ERP5/tests/testAccountingReports.py
product/ERP5/tests/testAccountingReports.py
+11
-4
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerColumnItemList.py
View file @
eeb263f5
return
(
(
'Movement_getNodeGapId'
,
'Account Code'
),
(
'node_translated_title'
,
'Account Name'
),
(
'Movement_getNodeFinancialSectionTitle'
,
'Financial Section'
),
(
'section_title'
,
'Section'
),
(
'mirror_section_title'
,
'Third Party'
),
(
'date'
,
'Operation Date'
),
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getNodeFinancialSectionTitle.py
0 → 100644
View file @
eeb263f5
cache_id
=
'{}.cache'
.
format
(
script
.
getId
())
financial_section_cache
=
context
.
REQUEST
.
other
.
get
(
cache_id
,
{})
key
=
brain
.
node_relative_url
financial_section_title
=
financial_section_cache
.
get
(
key
)
if
financial_section_title
is
None
:
financial_section_title
=
context
.
getPortalObject
().
restrictedTraverse
(
key
).
getFinancialSectionTranslatedTitle
()
financial_section_cache
[
key
]
=
financial_section_title
context
.
REQUEST
.
other
[
cache_id
]
=
financial_section_cache
return
financial_section_title
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getNodeFinancialSectionTitle.xml
0 → 100644
View file @
eeb263f5
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
brain, selection=None, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Movement_getNodeFinancialSectionTitle
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.py
View file @
eeb263f5
...
...
@@ -190,7 +190,8 @@ if from_date or is_pl_account:
if
params
.
get
(
'node_uid'
):
previous_balance
.
edit
(
Movement_getNodeGapId
=
node
.
Account_getGapId
(),
node_translated_title
=
node
.
getTranslatedTitle
()
node_translated_title
=
node
.
getTranslatedTitle
(),
Movement_getNodeFinancialSectionTitle
=
node
.
getFinancialSectionTranslatedTitle
(),
)
if
params
.
get
(
'mirror_section_uid'
):
brain_list
=
portal
.
portal_catalog
(
uid
=
params
[
'mirror_section_uid'
],
limit
=
2
)
...
...
product/ERP5/tests/testAccountingReports.py
View file @
eeb263f5
...
...
@@ -5399,8 +5399,8 @@ DT, b, P2 - Project 2''',
self
.
assertEqual
(
3
,
len
(
data_line_list
))
self
.
assertEqual
(
[
'Movement_getNodeGapId'
,
'node_translated_title'
,
'
section_t
itle'
,
'mirror_section_title'
,
'date'
,
'modification_date'
,
[
'Movement_getNodeGapId'
,
'node_translated_title'
,
'
Movement_getNodeFinancialSectionT
itle'
,
'
section_title'
,
'
mirror_section_title'
,
'date'
,
'modification_date'
,
'Movement_getSpecificReference'
,
'Movement_getExplanationTranslatedPortalType'
,
'Movement_getExplanationTitle'
,
'Movement_getExplanationReference'
,
...
...
@@ -5417,6 +5417,7 @@ DT, b, P2 - Project 2''',
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getNodeGapId
=
'7'
,
node_translated_title
=
'Goods Sales'
,
Movement_getNodeFinancialSectionTitle
=
'Sales Revenues'
,
section_title
=
'My Organisation'
,
mirror_section_title
=
'Client 1'
,
date
=
DateTime
(
2006
,
2
,
2
),
...
...
@@ -5442,6 +5443,7 @@ DT, b, P2 - Project 2''',
self
.
checkLineProperties
(
data_line_list
[
1
],
Movement_getNodeGapId
=
'7'
,
node_translated_title
=
'Goods Sales'
,
Movement_getNodeFinancialSectionTitle
=
'Sales Revenues'
,
section_title
=
'My Organisation'
,
mirror_section_title
=
'Client 1'
,
date
=
DateTime
(
2006
,
2
,
2
),
...
...
@@ -5467,6 +5469,7 @@ DT, b, P2 - Project 2''',
self
.
checkLineProperties
(
data_line_list
[
2
],
Movement_getNodeGapId
=
'7'
,
node_translated_title
=
'Goods Sales'
,
Movement_getNodeFinancialSectionTitle
=
'Sales Revenues'
,
section_title
=
'My Organisation'
,
mirror_section_title
=
'Client 1'
,
date
=
DateTime
(
2006
,
2
,
2
),
...
...
@@ -5630,8 +5633,8 @@ DT, b, P2 - Project 2''',
# all the columns configured in AccountModule_getGeneralLedgerColumnItemList
# are displayed
self
.
assertEqual
(
[
'Movement_getNodeGapId'
,
'node_translated_title'
,
'
section_t
itle'
,
'mirror_section_title'
,
'date'
,
'modification_date'
,
[
'Movement_getNodeGapId'
,
'node_translated_title'
,
'
Movement_getNodeFinancialSectionT
itle'
,
'
section_title'
,
'
mirror_section_title'
,
'date'
,
'modification_date'
,
'Movement_getSpecificReference'
,
'Movement_getExplanationTranslatedPortalType'
,
'Movement_getExplanationTitle'
,
'Movement_getExplanationReference'
,
...
...
@@ -5651,6 +5654,7 @@ DT, b, P2 - Project 2''',
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getNodeGapId
=
'41'
,
node_translated_title
=
'Receivable'
,
Movement_getNodeFinancialSectionTitle
=
'Accounts Receivable'
,
section_title
=
'My Organisation'
,
mirror_section_title
=
'Client 1'
,
date
=
DateTime
(
2006
,
2
,
2
),
...
...
@@ -5681,6 +5685,7 @@ DT, b, P2 - Project 2''',
self
.
checkLineProperties
(
data_line_list
[
0
],
Movement_getNodeGapId
=
'7'
,
node_translated_title
=
'Goods Sales'
,
Movement_getNodeFinancialSectionTitle
=
'Sales Revenues'
,
section_title
=
'My Organisation'
,
mirror_section_title
=
'Client 1'
,
date
=
DateTime
(
2006
,
2
,
2
),
...
...
@@ -5707,6 +5712,7 @@ DT, b, P2 - Project 2''',
self
.
checkLineProperties
(
data_line_list
[
1
],
Movement_getNodeGapId
=
'7'
,
node_translated_title
=
'Goods Sales'
,
Movement_getNodeFinancialSectionTitle
=
'Sales Revenues'
,
section_title
=
'My Organisation'
,
mirror_section_title
=
'Client 1'
,
date
=
DateTime
(
2006
,
2
,
2
),
...
...
@@ -5733,6 +5739,7 @@ DT, b, P2 - Project 2''',
self
.
checkLineProperties
(
data_line_list
[
2
],
Movement_getNodeGapId
=
'7'
,
node_translated_title
=
'Goods Sales'
,
Movement_getNodeFinancialSectionTitle
=
'Sales Revenues'
,
section_title
=
'My Organisation'
,
mirror_section_title
=
'Client 1'
,
date
=
DateTime
(
2006
,
2
,
2
),
...
...
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