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
f2004a49
Commit
f2004a49
authored
Oct 10, 2022
by
Kazuhiko Shiozaki
Committed by
Jérome Perrin
May 20, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! fixup! py2/py3: dict_key does not have sort().
parent
b05d2532
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
24 deletions
+11
-24
bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_hashVariationCategoryList.py
...tal_skins/erp5_budget/Budget_hashVariationCategoryList.py
+4
-3
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_callDialogMethod.py
...portal_skins/erp5_hal_json_style/Base_callDialogMethod.py
+1
-4
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_generateMonthDomain.py
.../portal_skins/erp5_project/Project_generateMonthDomain.py
+1
-3
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.ImmobilisableItem.py
...Item/portal_components/document.erp5.ImmobilisableItem.py
+2
-6
product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.CachedConvertableMixin.py
...em/portal_components/mixin.erp5.CachedConvertableMixin.py
+1
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.py
...plateItem/portal_skins/erp5_core/Base_callDialogMethod.py
+1
-2
product/ERP5Type/Core/Predicate.py
product/ERP5Type/Core/Predicate.py
+1
-3
No files found.
bt5/erp5_budget/SkinTemplateItem/portal_skins/erp5_budget/Budget_hashVariationCategoryList.py
View file @
f2004a49
...
...
@@ -68,6 +68,7 @@ for item in item_list:
else
:
sub_field_dict
[
item_key
][
'title'
]
=
base_category
sub_field_values
=
sub_field_dict
.
values
()
sub_field_values
.
sort
(
key
=
lambda
d
:
d
[
'int_index'
])
return
sub_field_values
return
sorted
(
sub_field_dict
.
values
(),
key
=
lambda
d
:
d
[
'int_index'
]
)
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_callDialogMethod.py
View file @
f2004a49
...
...
@@ -182,10 +182,7 @@ if len(listbox_id_list):
for
listbox_id
in
listbox_id_list
:
listbox_line_list
=
[]
listbox
=
kw
[
listbox_id
]
listbox_keys
=
listbox
.
keys
()
listbox_keys
.
sort
()
for
key
in
listbox_keys
:
listbox_line
=
listbox
[
key
]
for
key
,
listbox_line
in
sorted
(
six
.
iteritems
(
listbox
)):
listbox_line
[
'listbox_key'
]
=
key
listbox_line_list
.
append
(
listbox_line
)
listbox_line_list
=
tuple
(
listbox_line_list
)
...
...
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_generateMonthDomain.py
View file @
f2004a49
...
...
@@ -41,9 +41,7 @@ if depth == 0:
category_list
=
[]
#i = 1
month_dict_list
=
month_dict
.
keys
()
month_dict_list
.
sort
()
for
year
,
month
in
month_dict_list
:
for
year
,
month
in
sorted
(
month_dict
.
keys
()):
category_list
.
append
(
here
.
getObject
().
asContext
(
title
=
"%s - %s"
%
(
year
,
month
),
string_index
=
"%s-%s"
%
(
year
,
month
),
))
...
...
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.ImmobilisableItem.py
View file @
f2004a49
...
...
@@ -26,8 +26,6 @@
#
##############################################################################
from
Products.ERP5Type.Utils
import
ensure_list
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
...
...
@@ -318,8 +316,7 @@ class ImmobilisableItem(Item, Amount):
Returns a list of dictionaries representing immobilisation periods for the object
from_date is included, to_date is excluded
"""
kw_key_list
=
kw
.
keys
()
kw_key_list
.
sort
()
kw_key_list
=
sorted
(
kw
.
keys
())
if
kw_key_list
.
count
(
'immo_cache_dict'
):
kw_key_list
.
remove
(
'immo_cache_dict'
)
immo_cache_dict
=
kw
.
get
(
'immo_cache_dict'
,
{
'period'
:{},
...
...
@@ -779,8 +776,7 @@ class ImmobilisableItem(Item, Amount):
"""
if
at_date
is
None
:
at_date
=
DateTime
()
kw_key_list
=
ensure_list
(
kw
.
keys
())
kw_key_list
.
sort
()
kw_key_list
=
sorted
(
kw
.
keys
())
if
kw_key_list
.
count
(
'immo_cache_dict'
):
kw_key_list
.
remove
(
'immo_cache_dict'
)
...
...
product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.CachedConvertableMixin.py
View file @
f2004a49
...
...
@@ -41,9 +41,7 @@ from OFS.Image import Pdata, Image as OFSImage
from
DateTime
import
DateTime
def
makeSortedTuple
(
kw
):
items
=
kw
.
items
()
items
.
sort
()
return
tuple
(
items
)
return
tuple
(
sorted
(
kw
.
items
()))
def
hashPdataObject
(
pdata_object
):
"""Pdata objects are iterable, use this feature strongly
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.py
View file @
f2004a49
...
...
@@ -132,8 +132,7 @@ if len(listbox_id_list):
for
listbox_id
in
listbox_id_list
:
listbox_line_list
=
[]
listbox
=
kw
[
listbox_id
]
for
key
,
value
in
sorted
(
six
.
iteritems
(
listbox
)):
listbox_line
=
value
for
key
,
listbox_line
in
sorted
(
six
.
iteritems
(
listbox
)):
listbox_line
[
'listbox_key'
]
=
key
listbox_line_list
.
append
(
listbox_line
)
listbox_line_list
=
tuple
(
listbox_line_list
)
...
...
product/ERP5Type/Core/Predicate.py
View file @
f2004a49
...
...
@@ -332,9 +332,7 @@ class Predicate(XMLObject):
criterion_dict
[
p
].
property
=
p
criterion_dict
[
p
].
min
=
self
.
_range_criterion
.
get
(
p
,
(
None
,
None
))[
0
]
criterion_dict
[
p
].
max
=
self
.
_range_criterion
.
get
(
p
,
(
None
,
None
))[
1
]
criterion_list
=
criterion_dict
.
values
()
criterion_list
.
sort
()
return
criterion_list
return
sorted
(
criterion_dict
.
values
())
security
.
declareProtected
(
Permissions
.
ModifyPortalContent
,
'setCriterion'
)
def
setCriterion
(
self
,
property
,
identity
=
None
,
min
=
None
,
max
=
None
,
**
kw
):
...
...
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