Commit 0b53ea88 authored by Arnaud Fontaine's avatar Arnaud Fontaine

CategoryProperty for ZODB Property Sheets is now a document

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39737 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0aebe3d3
...@@ -97,17 +97,14 @@ class PropertySheetTool(BaseTool): ...@@ -97,17 +97,14 @@ class PropertySheetTool(BaseTool):
for category in getattr(klass, '_categories', []): for category in getattr(klass, '_categories', []):
# A category may be a TALES Expression rather than a plain # A category may be a TALES Expression rather than a plain
# string # string
if isinstance(category, Expression): portal_type = isinstance(category, Expression) and \
'Dynamic Category Property' or 'Category Property'
new_category = new_property_sheet.newContent( new_category = new_property_sheet.newContent(
portal_type='Dynamic Category Property') portal_type=portal_type)
# Set the category TALES expression
new_category.importFromFilesystemDefinition(category) new_category.importFromFilesystemDefinition(category)
else:
new_property_sheet.newContent(id=category,
portal_type='Category Property')
return new_property_sheet return new_property_sheet
security.declareProtected(Permissions.ManagePortal, security.declareProtected(Permissions.ManagePortal,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment