diff --git a/product/ERP5Type/Core/Folder.py b/product/ERP5Type/Core/Folder.py index 9a26cc2fa790cc9776e82c93edbcc4ac72306088..5fa5b58165e2fccd5eca7ebeca4831b91e7cf9a1 100644 --- a/product/ERP5Type/Core/Folder.py +++ b/product/ERP5Type/Core/Folder.py @@ -167,7 +167,8 @@ class FolderMixIn(ExtensionClass.Base): # TODO :the **kw makes it impossible to create content not based on # ERP5TypeInformation, because factory method often do not support # keywords arguments. - + if temp_container: + container._setObject(new_id, new_instance.aq_base) if kw: new_instance._edit(force_update=1, **kw) return new_instance diff --git a/product/ERP5Type/Utils.py b/product/ERP5Type/Utils.py index efd2264725d1055adaa7e3d7940847ef2d547884..3d4a25da4a5b2cdf1449be04e14e38dc9bf77e52 100644 --- a/product/ERP5Type/Utils.py +++ b/product/ERP5Type/Utils.py @@ -561,8 +561,6 @@ class TempDocumentConstructor(DocumentConstructor): # through the factory system. if getattr(aq_base(folder), 'Destination', None) is not None: folder = folder.Destination() - if folder.isTempObject(): - folder._setObject(id, o) o = o.__of__(folder) if kw: o._edit(force_update=1, **kw)