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
Titouan Soulard
erp5
Commits
469c62b3
Commit
469c62b3
authored
Mar 16, 2023
by
Kazuhiko Shiozaki
Committed by
Jérome Perrin
Aug 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py2/py3: use OrderableKey in BuilderMixin to support sort with None and int etc.
parent
5870359d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.py
...TemplateItem/portal_components/mixin.erp5.BuilderMixin.py
+3
-2
No files found.
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.py
View file @
469c62b3
...
@@ -36,6 +36,7 @@ from erp5.component.document.Amount import Amount
...
@@ -36,6 +36,7 @@ from erp5.component.document.Amount import Amount
from
erp5.component.module.MovementGroup
import
MovementGroupNode
from
erp5.component.module.MovementGroup
import
MovementGroupNode
from
Products.ERP5Type.TransactionalVariable
import
getTransactionalVariable
from
Products.ERP5Type.TransactionalVariable
import
getTransactionalVariable
from
Products.ERP5Type.UnrestrictedMethod
import
UnrestrictedMethod
from
Products.ERP5Type.UnrestrictedMethod
import
UnrestrictedMethod
from
Products.ERP5Type.Utils
import
OrderableKey
from
erp5.component.module.ExplanationCache
import
_getExplanationCache
from
erp5.component.module.ExplanationCache
import
_getExplanationCache
from
DateTime
import
DateTime
from
DateTime
import
DateTime
from
Acquisition
import
aq_parent
,
aq_inner
from
Acquisition
import
aq_parent
,
aq_inner
...
@@ -785,8 +786,8 @@ class BuilderMixin(XMLObject, Amount, Predicate):
...
@@ -785,8 +786,8 @@ class BuilderMixin(XMLObject, Amount, Predicate):
def
sort_movement_group_key
(
a
):
def
sort_movement_group_key
(
a
):
return
(
return
(
category_index_dict
.
get
(
a
.
getCollectOrderGroup
(
)),
OrderableKey
(
category_index_dict
.
get
(
a
.
getCollectOrderGroup
()
)),
a
.
getIntIndex
(
),
OrderableKey
(
a
.
getIntIndex
()
),
)
)
if
portal_type
is
None
:
if
portal_type
is
None
:
portal_type
=
self
.
getPortalMovementGroupTypeList
()
portal_type
=
self
.
getPortalMovementGroupTypeList
()
...
...
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