[Erp5-report] r22574 - /erp5/trunk/products/ERP5Type/XMLObject.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Sun Jul 20 15:27:52 CEST 2008
Author: jp
Date: Sun Jul 20 15:27:52 2008
New Revision: 22574
URL: http://svn.erp5.org?rev=22574&view=rev
Log:
Override setDescription method so that we use ERP5Type accessors (which are capable of casting values) rather than CMF default setDescription method.
Modified:
erp5/trunk/products/ERP5Type/XMLObject.py
Modified: erp5/trunk/products/ERP5Type/XMLObject.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/XMLObject.py?rev=22574&r1=22573&r2=22574&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/XMLObject.py (original)
+++ erp5/trunk/products/ERP5Type/XMLObject.py Sun Jul 20 15:27:52 2008
@@ -90,6 +90,17 @@
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject )
+ # Inheritance fixes
+ security.declareProtected( Permissions.ModifyPortalContent, 'setDescription' )
+ def setDescription(self, value):
+ """
+ Sets the description by invoking the Accessor
+ based method rather than the one inherited from CMF.
+ This is require to make sure that value is casted
+ """
+ self._setDescription(value)
+ self.reindexObject()
+
security.declareProtected( Permissions.ModifyPortalContent, 'XUpdateDocument' )
def XUpdateDocument(self, xupdate):
"""
More information about the Erp5-report
mailing list