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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
b1e92e1b
Commit
b1e92e1b
authored
Jan 25, 2012
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
List Document Components as well as filesystem Document in Portal Type view.
parent
86c84618
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
product/ERP5Type/Tool/TypesTool.py
product/ERP5Type/Tool/TypesTool.py
+9
-1
No files found.
product/ERP5Type/Tool/TypesTool.py
View file @
b1e92e1b
...
@@ -204,7 +204,15 @@ class TypesTool(TypeProvider):
...
@@ -204,7 +204,15 @@ class TypesTool(TypeProvider):
Return a list of Document types that can be used as Base classes
Return a list of Document types that can be used as Base classes
"""
"""
from
Products.ERP5Type
import
document_class_registry
from
Products.ERP5Type
import
document_class_registry
return
sorted
(
document_class_registry
)
document_type_set
=
set
(
document_class_registry
)
# XXX-arnau: should be cached and reference?
component_tool
=
self
.
getPortalObject
().
portal_components
for
obj
in
component_tool
.
searchFolder
(
portal_type
=
'Document Component'
,
validation_state
=
'validated'
):
document_type_set
.
add
(
obj
.
getReference
())
return
sorted
(
document_type_set
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getPortalTypeClass'
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getPortalTypeClass'
)
def
getPortalTypeClass
(
self
,
context
,
temp
=
False
):
def
getPortalTypeClass
(
self
,
context
,
temp
=
False
):
...
...
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