Commit 89df3005 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_corporate_identity: use delegate class to do conversion

parent ecd594e2
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
# Cloudooo uses zip= argument, which is also a python builtin # Cloudooo uses zip= argument, which is also a python builtin
# pylint: disable=redefined-builtin # pylint: disable=redefined-builtin
from xmlrpclib import ServerProxy from Products.ERP5OOo.Document.OOoDocument import OOoServerProxy
from base64 import b64encode, b64decode from base64 import b64encode, b64decode
from zExceptions import Unauthorized from zExceptions import Unauthorized
...@@ -45,10 +45,7 @@ def convertDocumentByConversionServer( ...@@ -45,10 +45,7 @@ def convertDocumentByConversionServer(
if REQUEST is not None: if REQUEST is not None:
raise Unauthorized raise Unauthorized
proxy = ServerProxy( proxy = OOoServerProxy(self)
self.getPortalObject().portal_preferences.getPreferredDocumentConversionServerUrl(),
allow_none=True
)
return b64decode( return b64decode(
proxy.convertFile( proxy.convertFile(
b64encode(data), b64encode(data),
......
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