[Erp5-report] r39735 arnaud.fontaine - in /erp5/trunk/products/ERP5Type: Core/ PropertySheet/
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Nov 1 06:14:07 CET 2010
Author: arnaud.fontaine
Date: Mon Nov 1 06:14:06 2010
New Revision: 39735
URL: http://svn.erp5.org?rev=39735&view=rev
Log:
Add missing default values for core properties of ZODB Property Sheets
Modified:
erp5/trunk/products/ERP5Type/Core/AcquiredProperty.py
erp5/trunk/products/ERP5Type/PropertySheet/AcquiredProperty.py
erp5/trunk/products/ERP5Type/PropertySheet/StandardProperty.py
erp5/trunk/products/ERP5Type/PropertySheet/TranslatableProperty.py
Modified: erp5/trunk/products/ERP5Type/Core/AcquiredProperty.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Core/AcquiredProperty.py?rev=39735&r1=39734&r2=39735&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Core/AcquiredProperty.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Core/AcquiredProperty.py [utf8] Mon Nov 1 06:14:06 2010
@@ -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
Modified: erp5/trunk/products/ERP5Type/PropertySheet/AcquiredProperty.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/PropertySheet/AcquiredProperty.py?rev=39735&r1=39734&r2=39735&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/PropertySheet/AcquiredProperty.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/PropertySheet/AcquiredProperty.py [utf8] Mon Nov 1 06:14:06 2010
@@ -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 },
)
Modified: erp5/trunk/products/ERP5Type/PropertySheet/StandardProperty.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/PropertySheet/StandardProperty.py?rev=39735&r1=39734&r2=39735&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/PropertySheet/StandardProperty.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/PropertySheet/StandardProperty.py [utf8] Mon Nov 1 06:14:06 2010
@@ -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',)
Modified: erp5/trunk/products/ERP5Type/PropertySheet/TranslatableProperty.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/PropertySheet/TranslatableProperty.py?rev=39735&r1=39734&r2=39735&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/PropertySheet/TranslatableProperty.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/PropertySheet/TranslatableProperty.py [utf8] Mon Nov 1 06:14:06 2010
@@ -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 },
)
More information about the Erp5-report
mailing list