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
Carlos Ramos Carreño
erp5
Commits
e921bbca
Commit
e921bbca
authored
Feb 16, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: stop using deprecated getParent()
parent
d4e7a3d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/WorkflowVariable_view/my_guard_role_list.xml
...ns/erp5_core/WorkflowVariable_view/my_guard_role_list.xml
+1
-1
product/ERP5Type/Base.py
product/ERP5Type/Base.py
+2
-2
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/WorkflowVariable_view/my_guard_role_list.xml
View file @
e921bbca
...
@@ -118,7 +118,7 @@
...
@@ -118,7 +118,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
_text
</string>
</key>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: [(x, x) for x in here.getParent().getManagedRoleList()]
</string>
</value>
<value>
<string>
python: [(x, x) for x in here.getParent
Value
().getManagedRoleList()]
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
product/ERP5Type/Base.py
View file @
e921bbca
...
@@ -1751,11 +1751,11 @@ class Base(
...
@@ -1751,11 +1751,11 @@ class Base(
"""Returns the parent of the current object (whereas it should return the
"""Returns the parent of the current object (whereas it should return the
relative_url of the parent for consistency with CMFCategory.
relative_url of the parent for consistency with CMFCategory.
This method still uses this behavio
u
r, because some part of the code still
This method still uses this behavior, because some part of the code still
uses getParent instead of getParentValue. This may change in the future.
uses getParent instead of getParentValue. This may change in the future.
"""
"""
warnings
.
warn
(
"getParent implementation still returns the parent object, "
\
warnings
.
warn
(
"getParent implementation still returns the parent object, "
\
"which is inconsist
a
nt with CMFCategory API. "
\
"which is inconsist
e
nt with CMFCategory API. "
\
"Use getParentValue instead"
,
FutureWarning
)
"Use getParentValue instead"
,
FutureWarning
)
return
self
.
getParentValue
()
# Compatibility
return
self
.
getParentValue
()
# Compatibility
...
...
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