• Ayush Tiwari's avatar
    erp5_catalog: Dynamic migration · a5fda48a
    Ayush Tiwari authored
    And, Patch changeObjectClass extension to remove useless attributes
    
    Copying __dict__ from one object to another brings us to situation where
    we don have many objects which we don't need at all, for example, migrating
    objects with subclasses who were initially OFS objects and later an ERP5
    object can lead to adding subobjects as attributes of the new object, which
    is completely undesirable. To handle this, it is important to delete the
    sub-objects as the attributes for those migrated classes.
    
    erp5_catalog: Refactor _bootstrap for Catalog Tool
    
    Old Catalog Tool didn't have portal_type attribute, so while migrating
    via synchronizeDynamicModule, after _bootstrap, we expect the tool to
    have a portal_type to finalize migration.
    
    This step is now being done only at the end of _bootstrap after we
    change the classes for portal_catalog and its sub-objects.
    
    And, changes to improve performance while dynamic migration.
    
    XXX: Still at this point we are not doing the same thing with
    sub-objects of catalog tool and wait till business template
    installation.
    
    erp5_catalog: Update attributes of the portal_catalog object after migration
    a5fda48a
CatalogTool.py 49.5 KB