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
Léo-Paul Géneau
erp5
Commits
257974be
Commit
257974be
authored
Jan 13, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
calendar: address pylint warnings
also rewrite a sorted to use key instead of cmp
parent
9c567e2e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
8 deletions
+3
-8
bt5/erp5_calendar/SkinTemplateItem/portal_skins/erp5_calendar/Orgnaisation_generatePlanningDomain.py
...kins/erp5_calendar/Orgnaisation_generatePlanningDomain.py
+3
-7
bt5/erp5_calendar/SkinTemplateItem/portal_skins/erp5_calendar/PersonModule_getLeaveRequestReportListboxUntranslatableColumnList.py
...e_getLeaveRequestReportListboxUntranslatableColumnList.py
+0
-1
No files found.
bt5/erp5_calendar/SkinTemplateItem/portal_skins/erp5_calendar/Orgnaisation_generatePlanningDomain.py
View file @
257974be
...
...
@@ -7,19 +7,15 @@ if object_path is None:
# Sometimes the object_path not comes with the request, when you edit for example.
object_path
=
request
.
get
(
'URL1'
).
split
(
'/'
)[
-
1
]
def
sorted
(
seq
,
comparator
):
new_seq
=
seq
[::]
new_seq
.
sort
(
comparator
)
return
new_seq
def
display_method
(
doc
):
return
doc
.
getTitle
()
domain_list
=
[]
organisation
=
context
.
organisation_module
.
restrictedTraverse
(
object_path
)
for
person
in
sorted
(
organisation
.
getSubordinationRelatedValueList
(
portal_type
=
'Person'
,
checked_permission
=
'View'
),
lambda
a
,
b
:
cmp
(
display_method
(
a
),
display_method
(
b
))
):
for
person
in
sorted
(
organisation
.
getSubordinationRelatedValueList
(
portal_type
=
'Person'
,
checked_permission
=
'View'
),
key
=
display_method
):
domain
=
parent
.
generateTempDomain
(
id
=
person
.
getId
())
domain
.
edit
(
title
=
display_method
(
person
),
membership_criterion_base_category
=
(
'source'
,
'destination'
),
...
...
bt5/erp5_calendar/SkinTemplateItem/portal_skins/erp5_calendar/PersonModule_getLeaveRequestReportListboxUntranslatableColumnList.py
View file @
257974be
from
Products.PythonScripts.standard
import
Object
request
=
container
.
REQUEST
portal
=
context
.
getPortalObject
()
stool
=
portal
.
portal_simulation
...
...
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