diff --git a/product/ERP5/Tool/ContributionTool.py b/product/ERP5/Tool/ContributionTool.py index 65a68db76ab455b9eb0e977c0b3fbe2f282fd312..10f9314737b1765f7e5495077e823eff6dbd4cdc 100644 --- a/product/ERP5/Tool/ContributionTool.py +++ b/product/ERP5/Tool/ContributionTool.py @@ -135,10 +135,6 @@ class ContributionTool(BaseTool): # we can pass file as parameter to ZPublisher # whenever we ingest email kw['data'] = data - # Temp objects use the standard newContent from Folder - if temp_object: - # For temp_object creation, use the standard method - return BaseTool.newContent(self, id=id, portal_type=portal_type, temp_object=1, **kw) document = None @@ -226,6 +222,11 @@ class ContributionTool(BaseTool): document.edit(file=kw['file']) return document + # Temp objects use the standard newContent from Folder + if temp_object: + # For temp_object creation, use the standard method + return BaseTool.newContent(self, id=id, portal_type=portal_type, temp_object=1, **kw) + # Then put the file inside ourselves for a short while if container_path is not None: container = self.getPortalObject().restrictedTraverse(container_path)