diff --git a/product/ERP5Form/Form.py b/product/ERP5Form/Form.py index 16e44a7e6c21bebd790b96ea9eabdac16ca956c9..8c330b86bfbfd7697e8c5f1ceaa758d5b04116bd 100644 --- a/product/ERP5Form/Form.py +++ b/product/ERP5Form/Form.py @@ -181,8 +181,14 @@ class TALESValue(StaticValue): kw['cell'] = request.cell else: kw['cell'] = request + if 'cell_index' not in kw and\ + getattr(request, 'cell_index', None) is not None: + kw['cell_index'] = request.cell_index elif getattr(REQUEST, 'cell', None) is not None: - kw['cell'] = REQUEST.cell + kw['cell'] = REQUEST.cell + if 'cell_index' not in kw and \ + getattr(REQUEST, 'cell_index', None) is not None: + kw['cell_index'] = REQUEST.cell_index # on Zope 2.12, only path expressions can access the CONTEXTS name # but ERP5 has many python expressions that try to access CONTEXTS, so # we try to keep backward compatibility diff --git a/product/ERP5Form/MatrixBox.py b/product/ERP5Form/MatrixBox.py index 18bfd58caa22d9ea48d805cb828820620d913bb1..937c7593c22b0ac252a5230deaf7d34cc2a4d965 100644 --- a/product/ERP5Form/MatrixBox.py +++ b/product/ERP5Form/MatrixBox.py @@ -362,6 +362,7 @@ class MatrixBoxWidget(Widget.Widget): kwd['base_id'] = cell_base_id cell = cell_getter_method(*kw, **kwd) REQUEST['cell'] = cell + REQUEST['cell_index'] = kw cell_body = '' cell_url = None