[Erp5-report] r40075 nicolas.dumazet - in /erp5/trunk/products: ERP5/bootstrap/erp5_core/Sk...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Nov 9 08:05:51 CET 2010


Author: nicolas.dumazet
Date: Tue Nov  9 08:05:49 2010
New Revision: 40075

URL: http://svn.erp5.org?rev=40075&view=rev
Log:
revert 40073 as we want to migrate BTs towards portal type classes

Details coming up.

Added:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_filterPortalTypeClassDiff.xml
      - copied unchanged from r40072, erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/TemplateTool_filterPortalTypeClassDiff.xml
Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
    erp5/trunk/products/ERP5Type/patches/XMLExportImport.py

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=40075&r1=40074&r2=40075&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Tue Nov  9 08:05:49 2010
@@ -1 +1 @@
-1781
\ No newline at end of file
+1782

Modified: erp5/trunk/products/ERP5Type/patches/XMLExportImport.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/XMLExportImport.py?rev=40075&r1=40074&r2=40075&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/XMLExportImport.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/patches/XMLExportImport.py [utf8] Tue Nov  9 08:05:49 2010
@@ -14,7 +14,7 @@
 
 # Make sure the xml export will be ordered
 
-import re, sys
+import re
 from ZODB.utils import u64, p64
 from Shared.DC.xml import ppml
 from base64 import encodestring
@@ -105,20 +105,6 @@ def cleanup_ZopePageTemplate(state):
 
 def cleanupState(classdef, state):
     classdef = getCleanClass(classdef)
-    # if possible, unmigrate document using portal_type as classes
-    # (in order to preserve forward compatibility)
-    if getattr(classdef, '__module__', None) == 'erp5.portal_type' and \
-       len(classdef.__bases__) == 1:
-      base, = classdef.__bases__
-      portal_type = isinstance(state, dict) and state.get('portal_type') or \
-                    getattr(base, 'portal_type', None)
-      if portal_type == classdef.__name__:
-        class_name = base.__name__
-        try:
-          module = sys.modules['Products.ERP5Type.Document.' + class_name]
-          classdef = getattr(module, class_name)
-        except KeyError:
-          classdef = base
     cleanupState = PICKLE_CLEANERS.get(classdef, lambda state: None)
     cleanupState(state)
     return classdef, state




More information about the Erp5-report mailing list