From a5ec7935f43712e31274fa0c6589032cc23b2e67 Mon Sep 17 00:00:00 2001
From: Tatuya Kamada <tatuya@nexedi.com>
Date: Sun, 23 May 2010 15:02:00 +0000
Subject: [PATCH] Set cell parameter before to get the enable field value,
 otherwise we can not use the cell property in the enable field itself.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35547 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Form/ListBox.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/product/ERP5Form/ListBox.py b/product/ERP5Form/ListBox.py
index 4e85fb6128..33e475d90e 100644
--- a/product/ERP5Form/ListBox.py
+++ b/product/ERP5Form/ListBox.py
@@ -2386,13 +2386,13 @@ class ListBoxHTMLRendererLine(ListBoxRendererLine):
           error_message = u''
           display_value = original_value
 
+        # We need a way to pass the current line object (ie. brain) to the
+        # field which is being displayed. Since the render_view API did not
+        # permit this, we use the 'cell' value to pass the line object.
+        request.set('cell', brain)
         enabled = editable_field.get_value('enabled', REQUEST=request)
         editable = editable_field.get_value('editable', REQUEST=request)
         if enabled:
-          # We need a way to pass the current line object (ie. brain) to the
-          # field which is being displayed. Since the render_view API did not
-          # permit this, we use the 'cell' value to pass the line object.
-          request.set('cell', brain)
           # Field is editable only if listbox lists it in editable columns AND
           # if listbox_field is editable
           cell_html = editable_field.render(
-- 
2.30.9