Commit e1bb3e5b authored by Arnaud Fontaine's avatar Arnaud Fontaine

Add missing default values for core properties of ZODB Property Sheets

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39735 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f9f758ed
......@@ -50,7 +50,7 @@ class AcquiredProperty(StandardProperty):
# Filesystem-based name of attributes specific to 'content' type
_content_type_attribute_tuple = ('portal_type',
'acquired_property_id',
'translation_acquired_property')
'translation_acquired_property_id')
# Add names specific to 'content' type (see StandardProperty)
_name_mapping_filesystem_to_zodb_dict = \
......@@ -83,15 +83,15 @@ class AcquiredProperty(StandardProperty):
StandardProperty.exportToFilesystemDefinition(self)
filesystem_property_dict.update(
{'acquisition_base_category': self.getAcquisitionBaseCategoryList() or None,
'acquisition_object_id': self.getAcquisitionObjectIdList() or None,
{'acquisition_base_category': self.getAcquisitionBaseCategoryList(),
'acquisition_object_id': self.getAcquisitionObjectIdList(),
'acquisition_portal_type': self._convertValueToTalesExpression(self.getAcquisitionPortalType()),
'acquisition_accessor_id': self.getAcquisitionAccessorId(),
'alt_accessor_id': self.getAltAccessorIdList() or None,
'alt_accessor_id': self.getAltAccessorIdList(),
'acquisition_copy_value': self.getAcquisitionCopyValue(),
'acquisition_mask_value': self.getAcquisitionMaskValue(),
'portal_type': self._convertValueToTalesExpression(self.getContentPortalType()),
'acquired_property_id': self.getContentAcquiredPropertyIdList() or None,
'translation_acquired_property_id': self.getContentTranslationAcquiredPropertyIdList() or None})
'acquired_property_id': self.getContentAcquiredPropertyIdList(),
'translation_acquired_property_id': self.getContentTranslationAcquiredPropertyIdList()})
return filesystem_property_dict
......@@ -33,34 +33,44 @@ class AcquiredProperty:
_properties = (
{ 'id': 'acquisition_base_category',
'type': 'lines',
'description' : 'The base categories to browse' },
'description' : 'The base categories to browse',
'default': None },
{ 'id': 'acquisition_object_id',
'type': 'lines',
'description' : 'The default contained object id to look up' },
'description' : 'The default contained object id to look up',
'default': None },
# TALES expression
{ 'id': 'acquisition_portal_type',
'type': 'string',
'description' : 'The portal types to browse' },
'description' : 'The portal types to browse',
'default': None },
{ 'id': 'acquisition_accessor_id',
'type': 'string',
'description' : 'Property to get from source' },
'description' : 'Property to get from source',
'default': None },
{ 'id': 'alt_accessor_id',
'type': 'lines',
'description' : 'Alternative accessor ids' },
'description' : 'Alternative accessor ids',
'default': None },
{ 'id': 'acquisition_copy_value',
'type': 'boolean',
'description' : 'Determines if acquired value should be copied' },
'description' : 'Determines if acquired value should be copied',
'default': False },
{ 'id': 'acquisition_mask_value',
'type': 'boolean',
'description' : 'Determines if the local value have priority' },
'description' : 'Determines if the local value have priority',
'default': False },
# TALES expression
{ 'id': 'content_portal_type',
'type': 'string',
'description' : 'Portal type of the object to create' },
'description' : 'Portal type of the object to create',
'default': None },
{ 'id': 'content_acquired_property_id',
'type': 'lines',
'description' : 'Properties to be synchronized with the current object' },
'description' : 'Properties to be synchronized with the current object',
'default': None },
{ 'id': 'content_translation_acquired_property_id',
'type': 'lines',
'description' : 'Properties to be translated' },
'description' : 'Properties to be translated',
'default': None },
)
......@@ -26,6 +26,8 @@
#
##############################################################################
from Products.ERP5Type import Permissions
class StandardProperty:
"""
Define a Standard Property for ZODB Property Sheets
......@@ -39,26 +41,33 @@ class StandardProperty:
# TALES expression
{ 'id': 'property_default',
'type': 'string',
'description': 'Default value if not set' },
'description': 'Default value if not set',
'default': None },
{ 'id': 'multivalued',
'type': 'boolean',
'description': 'Determines if the property is multivalued' },
'description': 'Determines if the property is multivalued',
'default': False },
{ 'id': 'range',
'type': 'boolean',
'description': 'Determines if the range accessors should be created' },
'description': 'Determines if the range accessors should be created' ,
'default': False },
{ 'id': 'preference',
'type': 'boolean',
'description': 'Determines if the preference accessors should be created' },
'description': 'Determines if the preference accessors should be created',
'default': False },
# CMF compatibility
{ 'id': 'storage_id',
'type': 'string',
'description' : 'Name to be used instead of the Reference' },
'description' : 'Name to be used instead of the Reference',
'default': None },
{ 'id': 'read_permission',
'type': 'string',
'description' : 'Permission needed to access Getters' },
'description' : 'Permission needed to access Getters',
'default': Permissions.AccessContentsInformation },
{ 'id': 'write_permission',
'type': 'string',
'description' : 'Permission needed to access Setters' },
'description' : 'Permission needed to access Setters',
'default': Permissions.ModifyPortalContent },
)
_categories = ('elementary_type',)
......@@ -33,8 +33,10 @@ class TranslatableProperty:
_properties = (
{ 'id': 'translatable',
'type': 'boolean',
'description' : 'Determines if the value is translatable' },
'description' : 'Determines if the value is translatable',
'default': False },
{ 'id': 'translation_domain',
'type': 'string',
'description' : 'Define the translation domain' },
'description' : 'Define the translation domain',
'default': None },
)
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