[Erp5-report] r16769 - /erp5/trunk/products/ERP5Form/ZPyChart.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Oct 2 11:31:44 CEST 2007
Author: jerome
Date: Tue Oct 2 11:31:43 2007
New Revision: 16769
URL: http://svn.erp5.org?rev=16769&view=rev
Log:
fix some undefined names
Modified:
erp5/trunk/products/ERP5Form/ZPyChart.py
Modified: erp5/trunk/products/ERP5Form/ZPyChart.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/ZPyChart.py?rev=16769&r1=16768&r2=16769&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ZPyChart.py (original)
+++ erp5/trunk/products/ERP5Form/ZPyChart.py Tue Oct 2 11:31:43 2007
@@ -107,10 +107,10 @@
# Retrieve the data and set the selection if data_method is not None
if data_method:
- if hasattr(here, data_method):
- data_method = getattr(here,data_method)
+ here = REQUEST.get('here', self)
+ if getattr(here, data_method, None) is not None:
+ data_method = getattr(here, data_method)
# Retrieve selection
- here = REQUEST.get('here', self)
selection = here.portal_selections.getSelectionFor(selection_name, REQUEST=REQUEST)
# Define the new selection data_method
selection.edit(method_id = data_method) # XXX This is probably wrong
@@ -149,7 +149,7 @@
ZMIField.__init__(self, id, **kw)
PythonScript.__init__(self, id)
- def download(self, selection_name=None, data_method=None, **kw):
+ def download(self, selection_name=None, data_method=None, REQUEST=None, **kw):
"""
This is where we actually render the chart. The main interest
of doing like this is to accelerate initial rendering
@@ -168,6 +168,7 @@
# Get the data method if defined
if data_method is not None:
+ here = REQUEST.get('here', self)
data_method = getattr(here, data_method, None)
# This is the default data, this is just in the case there is not method given
More information about the Erp5-report
mailing list