From dec79edec96168c6543f8387517edb04447a965f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Wed, 23 May 2007 14:07:21 +0000 Subject: [PATCH] Allow the use of 'context' variable in fields TALES expressions, for consistency with python scripts and page templates. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14570 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Form/Form.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/product/ERP5Form/Form.py b/product/ERP5Form/Form.py index 95cd8681f3..75c934ad5e 100644 --- a/product/ERP5Form/Form.py +++ b/product/ERP5Form/Form.py @@ -71,12 +71,13 @@ def get_value(self, id, **kw): kw['form'] = form kw['request'] = REQUEST kw['here'] = obj + kw['context'] = obj kw['modules'] = SecureModuleImporter kw['container'] = container try : kw['preferences'] = obj.getPortalObject().portal_preferences except AttributeError : - LOG('ERP5Form', 0, + LOG('ERP5Form', PROBLEM, 'portal_preferences not put in TALES context (not installed?)') # This allows to pass some pointer to the local object # through the REQUEST parameter. Not very clean. -- 2.30.9