[Erp5-report] r7375 - /erp5/trunk/products/ERP5Type/CopySupport.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon May 22 09:05:04 CEST 2006


Author: alex
Date: Mon May 22 09:04:55 2006
New Revision: 7375

URL: http://svn.erp5.org?rev=7375&view=rev
Log:
This patch was included in zope 2.7.5 which is quite old now.
No need to keep duplicate code.

Modified:
    erp5/trunk/products/ERP5Type/CopySupport.py

Modified: erp5/trunk/products/ERP5Type/CopySupport.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/CopySupport.py?rev=7375&r1=7374&r2=7375&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/CopySupport.py (original)
+++ erp5/trunk/products/ERP5Type/CopySupport.py Mon May 22 09:04:55 2006
@@ -29,7 +29,6 @@
 from Products.CMFCore.WorkflowCore import WorkflowException
 
 from zLOG import LOG
-import re
 
 class CopyContainer:
   """
@@ -176,25 +175,6 @@
           del uids[-1]
       if REQUEST is not None:
               return self.manage_main(self, REQUEST, update_menu=1)
-
-  copy_re=re.compile('^copy[0-9]*_of_')
-
-  def _get_id(self, id):
-      # Allow containers to override the generation of
-      # object copy id by attempting to call its _get_id
-      # method, if it exists.
-      copy_match=self.copy_re.match(id)
-      if (copy_match) and (copy_match.end() < len(id)):
-          n=1
-          orig_id=self.copy_re.sub('', id)
-      else:
-          n=0
-          orig_id=id
-      while 1:
-          if self._getOb(id, None) is None:
-              return id
-          id='copy%s_of_%s' % (n and n+1 or '', orig_id)
-          n=n+1
 
   # Copy and paste support
   def manage_afterClone(self, item):




More information about the Erp5-report mailing list