• Ayush Tiwari's avatar
    erp5_catalog: Do not use lazy_class objects while generating UIDs · 292af552
    Ayush Tiwari authored
    Earlier, class for any Catalog object used to be Products.ZSQLCatalog.SQLCatalog,
    but now as we have shifted SQLCatalog to ERP5Catalog, the catalog objects have
    lazy_class 'erp5.portal_type.Catalog' as their 1st class in mro. This class
    don't have the required attributes.
    
    The lazy_class is dynamic, so its not possible for them to save reserved IDs
    as their attributes. So, we use the next class in mro, which would be
    class 'Products.ERP5Catalog.ERP5Catalog' and save attributes in it.
    
    Notice that this change of 'self.__klass__' is not required if
    we are starting a lock with '_reserved_uid_lock' and then acquire-release it
    consicutively in one go(transaction).
    292af552
SQLCatalog.py 110 KB