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
Yoji Takeuchi
erp5
Commits
932d1d1d
Commit
932d1d1d
authored
May 24, 2019
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5.Tool.CategoryTool, Folder: Do not copy over special and ClassSecurityInfo attributes.
parent
cfd807ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
product/ERP5/Tool/CategoryTool.py
product/ERP5/Tool/CategoryTool.py
+3
-1
product/ERP5Type/Core/Folder.py
product/ERP5Type/Core/Folder.py
+3
-1
No files found.
product/ERP5/Tool/CategoryTool.py
View file @
932d1d1d
...
...
@@ -158,12 +158,14 @@ class CategoryTool(CMFCategoryTool, BaseTool):
# inherits from via BaseTool) and CMFCategoryTool in favour of the property
# from BaseTool (so it may override CopyContainer).
for
CopyContainer_property_id
in
CopyContainer
.
__dict__
:
if
CopyContainer_property_id
in
CategoryTool
.
__dict__
:
if
CopyContainer_property_id
.
startswith
(
'__'
)
or
CopyContainer_property_id
in
CategoryTool
.
__dict__
:
continue
try
:
BaseTool_property
=
getattr
(
BaseTool
,
CopyContainer_property_id
)
except
AttributeError
:
continue
if
isinstance
(
BaseTool_property
,
ClassSecurityInfo
):
continue
setattr
(
CategoryTool
,
CopyContainer_property_id
,
BaseTool_property
)
InitializeClass
(
CategoryTool
)
product/ERP5Type/Core/Folder.py
View file @
932d1d1d
...
...
@@ -1720,10 +1720,12 @@ for source_klass, destination_klass in \
# inherits from via Base) and those bases in favour of the property
# from Base (so it may override CopyContainer).
for
CopyContainer_property_id
in
CopyContainer
.
__dict__
:
if
CopyContainer_property_id
in
Folder
.
__dict__
:
if
CopyContainer_property_id
.
startswith
(
'__'
)
or
CopyContainer_property_id
in
Folder
.
__dict__
:
continue
try
:
Base_property
=
getattr
(
Base
,
CopyContainer_property_id
)
except
AttributeError
:
continue
if
isinstance
(
Base_property
,
ClassSecurityInfo
):
continue
setattr
(
Folder
,
CopyContainer_property_id
,
Base_property
)
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