Commit 907e0872 authored by Nicolas Dumazet's avatar Nicolas Dumazet

First argument of super() should be the current class

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38654 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 79d4d473
......@@ -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
......
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