diff --git a/product/ERP5Type/InitGenerator.py b/product/ERP5Type/InitGenerator.py index 5ef73091c24ed07edffdc73691a5595ad6c02e3f..e9b1b8cb0fb87a28f8b420b8fa2ef065399e1a3a 100755 --- a/product/ERP5Type/InitGenerator.py +++ b/product/ERP5Type/InitGenerator.py @@ -73,11 +73,11 @@ def generateInitFiles(this_module, global_hook, # Hide internal implementation from Products.ERP5Type.InitGenerator import InitializeDocument import %s as ERP5%s -if not hasattr(ERP5TypeDocumentRepository, '_override_%s'): ERP5TypeDocumentRepository.%s = ERP5%s.%s # Never override a local Document class +if not hasattr(ERP5TypeDocumentRepository, '_override_%s'): ERP5TypeDocumentRepository.%s = ERP5%s # Never override a local Document class # Default constructor for %s # Can be overriden by adding a method add%s in class %s def add%s(folder, id, REQUEST=None, **kw): - o = ERP5TypeDocumentRepository.%s(id) + o = ERP5TypeDocumentRepository.%s.%s(id) folder._setObject(id, o) if kw is not None: o.__of__(folder)._edit(force_update=1, **kw) # contentCreate already calls reindex 3 times ... @@ -85,9 +85,9 @@ def add%s(folder, id, REQUEST=None, **kw): if REQUEST is not None: REQUEST['RESPONSE'].redirect( 'manage_main' ) -InitializeDocument(ERP5TypeDocumentRepository.%s, document_path='%s') +InitializeDocument(ERP5TypeDocumentRepository.%s.%s, document_path='%s') -class Temp%s(ERP5TypeDocumentRepository.%s): +class Temp%s(ERP5TypeDocumentRepository.%s.%s): isIndexable = 0 def reindexObject(self, *args, **kw): @@ -113,13 +113,13 @@ from AccessControl import ModuleSecurityInfo ModuleSecurityInfo('Products.ERP5Type.Document').declarePublic('newTemp%s',) """ % (module_name, module_name, - module_name, module_name, module_name, module_name, + module_name, module_name, module_name, module_name, module_name, module_name, module_name, - module_name, - module_name, document_path, module_name, module_name, + module_name, module_name, document_path, + module_name, module_name, module_name, module_name, module_name, module_name, diff --git a/product/ERP5Type/Utils.py b/product/ERP5Type/Utils.py index 978d9abcfd58c3a77644bb36c6384f21efc8cd9d..6ecf2519f3d4ab6ef56a2232eca7216abb070fef 100755 --- a/product/ERP5Type/Utils.py +++ b/product/ERP5Type/Utils.py @@ -53,6 +53,8 @@ from zLOG import LOG ##################################################### INITIALIZE_PRODUCT_RAD = 1 # If set to 0, product documents are not initialized + # this will divide by two memory usage taken by getters and setters + # 0 value is suggested for new ERP5 projetcs ##################################################### # Compatibility - XXX - BAD