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
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
e7335b91
Commit
e7335b91
authored
Apr 03, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! *: use key instead of cmp to sort
parent
baadac86
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
17 deletions
+4
-17
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_getPersonDetailedCareerList.py
...tal_skins/erp5_base/Person_getPersonDetailedCareerList.py
+1
-4
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_getPersonDetailedContributionList.py
...ins/erp5_base/Person_getPersonDetailedContributionList.py
+1
-5
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_getPersonDetailedEventList.py
...rtal_skins/erp5_base/Person_getPersonDetailedEventList.py
+1
-4
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Order_printAsODSSummary.py
...teItem/portal_skins/erp5_trade/Order_printAsODSSummary.py
+1
-4
No files found.
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_getPersonDetailedCareerList.py
View file @
e7335b91
...
...
@@ -24,8 +24,5 @@ else:
or
career
.
getStopDate
()
<
to_date
:
career_list
.
append
(
career
)
def
date_cmp
(
a
,
b
):
return
cmp
(
a
.
getStartDate
(),
b
.
getStartDate
())
career_list
.
sort
(
date_cmp
)
career_list
.
sort
(
key
=
lambda
a
:
a
.
getStartDate
())
return
career_list
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_getPersonDetailedContributionList.py
View file @
e7335b91
...
...
@@ -88,11 +88,7 @@ for portal_type in portal_type_list:
obj
[
'total'
]
=
line_counter
append
(
obj
)
# sort lines
def
cmpType
(
a
,
b
):
return
cmp
(
a
[
'document_type'
],
b
[
'document_type'
])
line_list
.
sort
(
cmpType
)
line_list
.
sort
(
key
=
lambda
a
:
a
[
'document_type'
])
# build stat line
obj
=
Object
(
uid
=
"new_"
)
...
...
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_getPersonDetailedEventList.py
View file @
e7335b91
...
...
@@ -31,9 +31,6 @@ dest_event_list = portal.portal_catalog(portal_type=event_type_list, default_des
event_list
=
list
(
source_event_list
)
+
list
(
dest_event_list
)
def
sortDate
(
a
,
b
):
return
cmp
(
a
.
getStartDate
(),
b
.
getStartDate
())
event_list
.
sort
(
sortDate
)
event_list
.
sort
(
key
=
lambda
a
:
a
.
getStartDate
())
return
event_list
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Order_printAsODSSummary.py
View file @
e7335b91
...
...
@@ -23,13 +23,10 @@ full_total_price = 0
worker_column_list
=
[]
source_trade_dict
=
{}
def
sortMovement
(
a
,
b
):
return
cmp
(
a
.
getRelativeUrl
(),
b
.
getRelativeUrl
())
movement_type_list
=
context
.
getPortalMovementTypeList
()
line_list
=
[
x
for
x
in
context
.
getIndexableChildValueList
()
if
x
.
getPortalType
()
in
\
movement_type_list
]
line_list
.
sort
(
sortMovement
)
line_list
.
sort
(
key
=
lambda
line
:
line
.
getRelativeUrl
()
)
order_type_list
=
context
.
getPortalOrderTypeList
()
def
getMovementTitle
(
movement
):
...
...
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