From e2887dae2696cf1ba276140f91c9b7745c270ffa Mon Sep 17 00:00:00 2001
From: Romain Courteaud <romain@nexedi.com>
Date: Wed, 23 Feb 2005 16:12:20 +0000
Subject: [PATCH] Add _temp_ method defined for TempObject.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2546 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/Base.py | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py
index 79a848475c..2c23e76221 100755
--- a/product/ERP5Type/Base.py
+++ b/product/ERP5Type/Base.py
@@ -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):
-- 
2.30.9