Commit 6879d011 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Folder: Followup of 04b49859 to not use portal_trash since temp_object can now be created anywhere.

parent 1bce8563
......@@ -147,9 +147,10 @@ def checkConversionToolAvailability(self):
severity = 0
try:
temp_document = portal.portal_trash.newContent(
temp_document = self.newContent(
portal_type='OOo Document',
temp_object=True,
id=document_id,
data=document_file.data,
source_reference=document_id)
temp_document.convertToBaseFormat()
......
......@@ -66,7 +66,7 @@ class PaypalService(XMLObject):
"""See Payment Service Interface Documentation"""
page_template = kw.pop("page_template")
paypal_dict = kw.get("paypal_dict", {})
temp_document = self.getPortalObject().portal_trash.newContent(
temp_document = self.newContent(
portal_type='Document',
temp_object=True,
link_url_string=self.getLinkUrlString(),
......@@ -75,7 +75,7 @@ class PaypalService(XMLObject):
# append the rest of transmitted parameters page template
**kw
)
return getattr(temp_document.__of__(self), page_template)()
return getattr(temp_document, page_template)()
def notifySuccess(self, redirect_path=None, REQUEST=None):
"""See Payment Service Interface Documentation"""
......
......@@ -84,7 +84,7 @@ if hasattr(import_file, 'headers'):
content_type = import_file.headers.get('Content-Type', '')
if not (content_type.startswith('application/vnd.sun.xml')
or content_type.startswith('application/vnd.oasis.opendocument')):
tmp_ooo = portal.portal_trash.newContent(
tmp_ooo = context.newContent(
portal_type='OOo Document',
temp_object=True,
data=import_file.read(),
......
'''Returns all possible document conversions from the `base_content_type`.
'''
td = context.getPortalObject().portal_trash.newContent(
td = context.newContent(
portal_type='OOo Document',
temp_object=True,
base_content_type=base_content_type,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment