diff --git a/product/ERP5Form/Form.py b/product/ERP5Form/Form.py index 6fa4c4618f74ce6597cfa23033a6058b7307bf81..d949b58d211887bf796bd14e7e1d4757f4f48380 100644 --- a/product/ERP5Form/Form.py +++ b/product/ERP5Form/Form.py @@ -78,9 +78,6 @@ def get_value(self, id, **kw): except AttributeError : LOG('ERP5Form', 0, 'portal_preferences not put in TALES context (not installed?)') - extra_context = REQUEST.other.get('erp5_extra_context', None) - if extra_context: - kw.update(extra_context) # This allows to pass some pointer to the local object # through the REQUEST parameter. Not very clean. # Used by ListBox to render different items in a list diff --git a/product/ERP5Form/ProxyField.py b/product/ERP5Form/ProxyField.py index d382d321bc5a0399eaf500116490dcabb66c8eae..1e383037ef4f9a2f232c9509a11da86ac1b3a579 100644 --- a/product/ERP5Form/ProxyField.py +++ b/product/ERP5Form/ProxyField.py @@ -60,7 +60,6 @@ class ProxyWidget(Widget.Widget): 'form_id', 'field_id', 'target', - 'extra_context', ] form_id = fields.StringField( @@ -79,15 +78,6 @@ class ProxyWidget(Widget.Widget): default="", required=1) - # XXX FIXME This seems against the definition of proxy field... - # Remove it as soon as possible - extra_context = fields.ListTextAreaField( - 'extra_context', - title='Extra Context (deprecated)', - description='Additional context variables.', - default=(), - required=0) - target = fields.HyperLinkField( 'target', title='Proxy Target', @@ -103,7 +93,6 @@ class ProxyWidget(Widget.Widget): result = '' proxy_field = field.getRecursiveTemplateField() if proxy_field is not None: - REQUEST = field.updateContext(REQUEST) result = proxy_field.widget.render(field, key, value, REQUEST) return result @@ -114,7 +103,6 @@ class ProxyWidget(Widget.Widget): result = '' proxy_field = field.getRecursiveTemplateField() if proxy_field is not None: - REQUEST = field.updateContext(REQUEST) result = proxy_field.widget.render_htmlgrid(field, key, value, REQUEST) return result @@ -136,7 +124,6 @@ class ProxyValidator(Validator.Validator): def validate(self, field, key, REQUEST): proxy_field = field.getTemplateField() - REQUEST = field.updateContext(REQUEST) try: result = proxy_field.validator.validate(field, key, REQUEST) except ValidationError, error: @@ -432,15 +419,6 @@ class ProxyField(ZMIField): else: return ZMIField.get_error_message(self, name) - def updateContext(self, REQUEST): - """ - Update the REQUEST - """ - extra_context = REQUEST.other.get('erp5_extra_context', {}) - for k, v in self.get_value('extra_context'): - extra_context[k] = v - REQUEST.other['erp5_extra_context'] = extra_context - return REQUEST security.declareProtected('Edit target', 'manage_edit_target') def manage_edit_target(self, REQUEST):