Commit e2887dae authored by Romain Courteaud's avatar Romain Courteaud

Add _temp_ method defined for TempObject.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2546 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 58b3c580
......@@ -1761,6 +1761,36 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
from Products.ERP5Type.Error import Error
return Error(**kw)
_temp_isIndexable = 0
def _temp_reindexObject(self, *args, **kw):
pass
def _temp_recursiveReindexObject(self, *args, **kw):
pass
def _temp_activate(self):
return self
def _temp_setUid(self, value):
self.uid = value # Required for Listbox so that no casting happens when we use TempBase to create new objects
def _temp_setTitle(self, value):
"""
Required so that getProperty('title') will work on tempBase objects
The dynamic acquisition work very well for a lot of properties, but
not for title. For example, if we do setProperty('organisation_url'), then
even if organisation_url is not in a propertySheet, the method getOrganisationUrl
will be generated. But this does not work for title, because I(seb)'m almost sure
there is somewhere a method '_setTitle' or 'setTitle' with no method getTitle on Base.
That why setProperty('title') and getProperty('title') does not work.
"""
self.title = value
def _temp_getTitle(self):
return getattr(self,'title',None)
InitializeClass(Base)
class TempBase(Base):
......
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