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
Laurent S
erp5
Commits
4a46ea56
Commit
4a46ea56
authored
Nov 04, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounting: fix module view when a column is configured for numerical sorting
parent
2b3a4616
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getTransactionLineListForGroupingReference.py
...ctionModule_getTransactionLineListForGroupingReference.py
+15
-9
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getTransactionLineListForGroupingReference.py
View file @
4a46ea56
...
...
@@ -11,16 +11,22 @@ dialog_selection_params = portal.portal_selections.getSelectionParamsFor(
'grouping_reference_fast_input_selection'
)
# support pseudo sorting; sorting is done by uid.
orig_sort_on
=
portal
.
portal_selections
.
getSelectionSortOrder
(
'accounting_transaction_module_grouping_reference_fast_input'
)
or
((
'date'
,
'ascending'
),)
sort_on
=
[]
for
sort_column
,
sort_order
in
orig_sort_on
:
if
sort_column
in
(
'grouping_reference'
,
'date'
,
'parent_title'
):
sort_on
+=
[(
sort_column
,
sort_order
)]
elif
sort_column
==
'node_title'
:
sort_on
+=
[(
'stock.node_uid'
,
sort_order
)]
elif
sort_column
==
'Movement_getMirrorSectionTitle'
:
sort_on
+=
[(
'stock.mirror_section_uid'
,
sort_order
)]
for
column
in
portal
.
portal_selections
.
getSelectionSortOrder
(
'accounting_transaction_module_grouping_reference_fast_input'
)
or
((
'date'
,
'ascending'
),):
# column can be couple or a triplet
column_id
=
column
[
0
]
if
column_id
in
(
'grouping_reference'
,
'date'
,
'parent_title'
):
sort_on
.
append
(
column
)
else
:
if
column_id
==
'node_title'
:
column_id
=
'stock.node_uid'
elif
column_id
==
'Movement_getMirrorSectionTitle'
:
column_id
=
'stock.mirror_section_uid'
else
:
continue
sort_on
.
append
((
column_id
,
column
[
1
]))
section_category
=
portal
.
portal_preferences
.
getPreferredAccountingTransactionSectionCategory
()
section_category_strict
=
portal
.
portal_preferences
.
getPreferredAccountingSectionCategoryStrict
()
...
...
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