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
Lukas Niegsch
erp5
Commits
90551da8
Commit
90551da8
authored
Jan 10, 2020
by
Xiaowu Zhang
Committed by
Xiaowu Zhang
Apr 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_accounting: custom for grouping transactions
parent
c85f4778
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
26 deletions
+1
-26
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getGroupingExtraParameterList.py
...ccountingTransactionLine_getGroupingExtraParameterList.py
+1
-26
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getGroupingExtraParameterList.py
View file @
90551da8
"""This script is a placeholder for projects to implement extra constraint to prevent grouping of accounting transaction lines.
Note that the sequence of letters will still remain unique for section, mirror_section and node, regardless of extra grouping parameters.
For instance, we can refuse to group together lines for different order by returning the reference of the order in that script.
The returned value must be hashable.
"""
# By default we take into account ledger and mirror accounting.
# We consider ledger so that, by default we don't group lines from different ledger.
# This may be customized too, depending on how ledgers are used in customized implementations.
# We consider mirror accounting because that when using internal accounting transaction between
# two entities of the group, the grouping has to be valid for both sides
# (source_section & destination_section).
# This behavior was introduced in nexedi/erp5@f3bebea3 for compatibility,
# some old sites where accounting lines have been grouped together regardless of
# the mirror node can decide to ignore the mirror account.
# Maybe to ignore mirror account for transactions created before the date they
# deployed this new versions.
# This can be achieved easily by customizing this script.
if
source
:
return
context
.
getLedger
(),
context
.
getSource
(
portal_type
=
'Account'
)
return
context
.
getLedger
(),
context
.
getDestination
(
portal_type
=
'Account'
)
# custom: we do not care about mirror account
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