[Erp5-report] r41627 nicolas - /erp5/trunk/products/ERP5OOo/FormPrintout.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Dec 21 18:56:36 CET 2010
Author: nicolas
Date: Tue Dec 21 18:56:35 2010
New Revision: 41627
URL: http://svn.erp5.org?rev=41627&view=rev
Log:
Call refresh on document before return it to user to compute dynamics values
such as Variables, References, Charts, Fields.
Modified:
erp5/trunk/products/ERP5OOo/FormPrintout.py
Modified: erp5/trunk/products/ERP5OOo/FormPrintout.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/FormPrintout.py?rev=41627&r1=41626&r2=41627&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/FormPrintout.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/FormPrintout.py [utf8] Tue Dec 21 18:56:35 2010
@@ -275,6 +275,19 @@ class FormPrintout(Implicit, Persistent,
if REQUEST is not None and not format:
format = REQUEST.get('format', None)
filename = self.getProperty('filename')
+ # Call refresh through cloudooo
+ # XXX This is a temporary implementation:
+ # Calling a webservice must be done through a WebServiceMethod
+ # and a WebServiceConnection
+ from Products.ERP5OOo.Document.OOoDocument import OOoServerProxy, enc, dec
+ server_proxy = OOoServerProxy(self)
+ extension = guess_extension(content_type).strip('.')
+ printout = dec(server_proxy.convertFile(enc(printout),
+ extension, # source_format
+ extension, # destination_format
+ False, # zip
+ True)) # refresh
+ # End of temporary implementation
if not format:
if REQUEST is not None and not batch_mode:
REQUEST.RESPONSE.setHeader('Content-Type','%s' % content_type)
More information about the Erp5-report
mailing list