[Erp5-report] r24670 - /erp5/trunk/products/ERP5Form/OOoChart.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Nov 21 19:54:48 CET 2008
Author: nicolas
Date: Fri Nov 21 19:54:48 2008
New Revision: 24670
URL: http://svn.erp5.org?rev=24670&view=rev
Log:
Pass some usefull arguments inside xml structure.
This patch allow to render OOoChart inside deferred_style (asynchronous)
Modified:
erp5/trunk/products/ERP5Form/OOoChart.py
Modified: erp5/trunk/products/ERP5Form/OOoChart.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/OOoChart.py?rev=24670&r1=24669&r2=24670&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/OOoChart.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/OOoChart.py [utf8] Fri Nov 21 19:54:48 2008
@@ -400,10 +400,15 @@
here = getattr(form, 'aq_parent', REQUEST)
REQUEST.set('render_prefix', render_prefix)
#needed to update REQUEST
- self.getArgumentDict(field, REQUEST)
- content = '''
- <office:include path="%s/ERP5Site_buildChart" xlink:type="simple" xlink:actuate="onLoad" xlink:show="embed"/>
- ''' % here.getPath()
+ argument_dict = self.getArgumentDict(field, REQUEST)
+ from xml.marshal.generic import dumps
+ dump_args = dumps(argument_dict)
+ #remove xml declaration (first processing node)
+ dump_args = dump_args[dump_args.index('?>')+2:]
+ content = '''<office:include path="%s/ERP5Site_buildChart"
+ xlink:type="simple" xlink:actuate="onLoad"
+ xlink:show="embed">%s</office:include>
+ ''' % (here.getPath(), dump_args)
return content
More information about the Erp5-report
mailing list