[Erp5-report] r43351 arnaud.fontaine - /erp5/trunk/products/ERP5Type/Core/CategoryProperty.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Feb 15 15:03:04 CET 2011


Author: arnaud.fontaine
Date: Tue Feb 15 15:03:04 2011
New Revision: 43351

URL: http://svn.erp5.org?rev=43351&view=rev
Log:
Fix generation of reindexing setters

Modified:
    erp5/trunk/products/ERP5Type/Core/CategoryProperty.py

Modified: erp5/trunk/products/ERP5Type/Core/CategoryProperty.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Core/CategoryProperty.py?rev=43351&r1=43350&r2=43351&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Core/CategoryProperty.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Core/CategoryProperty.py [utf8] Tue Feb 15 15:03:04 2011
@@ -117,19 +117,6 @@ class CategoryProperty(XMLObject):
       'get%sTranslatedLogicalPath': Value.DefaultTranslatedLogicalPathGetter,
   }
   setter_definition_dict = {
-      # public 'reindexers'
-      'set%s': Alias.Reindex,
-      'set%sList': Alias.Reindex,
-      'setDefault%s': Alias.Reindex,
-      'set%sSet': Alias.Reindex,
-      'set%sValue': Alias.Reindex,
-      'set%sValueList': Alias.Reindex,
-      'set%sValueSet': Alias.Reindex,
-      'setDefault%sValue': Alias.Reindex,
-      'set%sUid': Alias.Reindex,
-      'set%sUidList': Alias.Reindex,
-      'set%sUidSet': Alias.Reindex,
-      'setDefault%sUid': Alias.Reindex,
       # setters
       '_set%s': Category.Setter,
       '_categorySet%s': Category.Setter,
@@ -232,6 +219,11 @@ class CategoryProperty(XMLObject):
       accessor = accessor_class(accessor_name, category_id)
       accessor_holder.registerAccessor(accessor, write_permission)
 
+      # TODO: merge with StandardProperty
+      if accessor_name.startswith('_set'):
+        accessor = Alias.Reindex(accessor_name[1:], accessor_name)
+        accessor_holder.registerAccessor(accessor, write_permission)
+
     accessor_holder._categories.append(category_id)
 
   security.declareProtected(Permissions.AccessContentsInformation,



More information about the Erp5-report mailing list