Commit f996d966 authored by Ayush Tiwari's avatar Ayush Tiwari

erp5_catalog: No need to create ERP5Catalog object here.

The reason is we need the new ERP5Catalog object to have all the
methods and properties which is possible only if SQLCatalog.Catalog object
has been instantiated with the methods and properties. So we create
this object while running migration from SQLCatalog to ERP5Catalog and
that is being done while running setUp for ERP5Site.
parent 29a7751f
......@@ -1318,17 +1318,13 @@ class ObjectTemplateItem(BaseTemplateItem):
container_path_new[-1] = container_path[-1]+'_new'
# Add ERP5Catalog object which will be further used as new Catalog
# instead of the SQLCatalog we used earlier
container_container.manage_addProduct['ERP5Catalog'].manage_addERP5Catalog(id=container_path_new[-1], title='')
#container_container.manage_addProduct['ERP5Catalog'].manage_addERP5Catalog(id=container_path_new[-1], title='')
# We will have more than 1 objects in portal_catalog as we are
# adding both ERP5Cataloga as well as SQLCatalog object here.
# adding both ERP5Catalog as well as SQLCatalog object here.
# Later on, this should be changed to use only ERP5Catalog object
if len(container_container.objectIds()) >= 1:
# Use ERP5Catalog object as the default sql catalog
container_container.default_sql_catalog_id = container_path_new[-1]
# Try installing ERP5Catalog instead of SQLCatalog
# Still in development phase, we are not completely removing the
# dependency on SQLCatlaog
container = portal.unrestrictedTraverse(container_path_new)
container_container.default_sql_catalog_id = container_path[-1]
container = portal.unrestrictedTraverse(container_path)
else:
raise
saved_uid_dict = {}
......
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