Commit ff8b912c authored by Nicolas Delaby's avatar Nicolas Delaby

Call refresh on document before return it to user to compute dynamics values

such as Variables, References, Charts, Fields.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41627 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ed8820b1
......@@ -275,6 +275,19 @@ class FormPrintout(Implicit, Persistent, RoleManager, Item, PropertyManager):
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)
......
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