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,16 +97,13 @@ class PropertySheetTool(BaseTool):
for category in getattr(klass, '_categories', []):
# A category may be a TALES Expression rather than a plain
# string
if isinstance(category, Expression):
new_category = new_property_sheet.newContent(
portal_type='Dynamic Category Property')
portal_type = isinstance(category, Expression) and \
'Dynamic Category Property' or 'Category Property'
# Set the category TALES expression
new_category.importFromFilesystemDefinition(category)
new_category = new_property_sheet.newContent(
portal_type=portal_type)
else:
new_property_sheet.newContent(id=category,
portal_type='Category Property')
new_category.importFromFilesystemDefinition(category)
return new_property_sheet
......
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