Commit f59878a1 authored by Nicolas Delaby's avatar Nicolas Delaby

Acquire REQUEST from context (faster)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31049 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 09e11a46
...@@ -36,7 +36,7 @@ from Products.ERP5Form.ImageField import ImageField ...@@ -36,7 +36,7 @@ from Products.ERP5Form.ImageField import ImageField
from Products.ERP5OOo.OOoUtils import OOoBuilder from Products.ERP5OOo.OOoUtils import OOoBuilder
from Products.CMFCore.exceptions import AccessControl_Unauthorized from Products.CMFCore.exceptions import AccessControl_Unauthorized
from Acquisition import Implicit, aq_base from Acquisition import Implicit, aq_base
from Products.ERP5Type.Globals import InitializeClass, DTMLFile, Persistent, get_request from Products.ERP5Type.Globals import InitializeClass, DTMLFile, Persistent
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from AccessControl.Role import RoleManager from AccessControl.Role import RoleManager
from OFS.SimpleItem import Item from OFS.SimpleItem import Item
...@@ -915,7 +915,7 @@ class ODTStrategy(ODFStrategy): ...@@ -915,7 +915,7 @@ class ODTStrategy(ODFStrategy):
iteration_index -- the index which is used when iterating the group of items using ReportSection. iteration_index -- the index which is used when iterating the group of items using ReportSection.
""" """
field_list = form.get_fields(include_disabled=1) field_list = form.get_fields(include_disabled=1)
REQUEST = get_request() REQUEST = here.REQUEST
for (count, field) in enumerate(field_list): for (count, field) in enumerate(field_list):
if isinstance(field, ListBox): if isinstance(field, ListBox):
element_tree = self._appendTableByListbox(element_tree=element_tree, element_tree = self._appendTableByListbox(element_tree=element_tree,
...@@ -1038,7 +1038,7 @@ class ODGStrategy(ODFStrategy): ...@@ -1038,7 +1038,7 @@ class ODGStrategy(ODFStrategy):
extra_context=None, ooo_builder=None, iteration_index=0): extra_context=None, ooo_builder=None, iteration_index=0):
field_list = form.get_fields(include_disabled=1) field_list = form.get_fields(include_disabled=1)
REQUEST = get_request() REQUEST = here.REQUEST
for (count, field) in enumerate(field_list): for (count, field) in enumerate(field_list):
field_value = self._renderField(field) field_value = self._renderField(field)
value = self._toUnicodeString(field_value) value = self._toUnicodeString(field_value)
......
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