[Erp5-report] r38654 nicolas.dumazet - /erp5/trunk/products/ERP5/Tool/TemplateTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Sep 27 11:11:27 CEST 2010


Author: nicolas.dumazet
Date: Mon Sep 27 11:11:22 2010
New Revision: 38654

URL: http://svn.erp5.org?rev=38654&view=rev
Log:
First argument of super() should be the current class

Modified:
    erp5/trunk/products/ERP5/Tool/TemplateTool.py

Modified: erp5/trunk/products/ERP5/Tool/TemplateTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/TemplateTool.py?rev=38654&r1=38653&r2=38654&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/TemplateTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Tool/TemplateTool.py [utf8] Mon Sep 27 11:11:22 2010
@@ -476,6 +476,16 @@ class TemplateTool (BaseTool):
           urltype = 'file'
           name = os.path.normpath(url)
 
+      from Products.ERP5Type.Utils import PersistentMigrationMixin
+      # disable dynamic imports of ERP5Type.Document.* documents
+      # into erp5.document new-style classes during import:
+      # reading the XML forces importing the object class, and doing
+      # so will try to access portal_types/<object portal type>, which
+      # will fail since portal types items are not yet imported.
+      # In reality, we can live with old-style objects 'til
+      # install
+      #PersistentMigrationMixin.migrate = 0
+
       if urltype and urltype != 'file':
         if '/portal_templates/asRepository/' in url:
           # In this case, the downloaded BT is already built.
@@ -487,6 +497,7 @@ class TemplateTool (BaseTool):
       else:
         bt = self._download_local(name, id)
 
+      #PersistentMigrationMixin.migrate = 1
       bt.build(no_action=True)
       return bt
 




More information about the Erp5-report mailing list