Commit 6e56ec18 authored by Julien Muchembled's avatar Julien Muchembled

Fix bug in matrixbox: an empty cell may display the value of another cell.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20956 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b77cece5
...@@ -297,6 +297,7 @@ class MatrixBoxWidget(Widget.Widget): ...@@ -297,6 +297,7 @@ class MatrixBoxWidget(Widget.Widget):
kwd = {} kwd = {}
kwd['base_id'] = cell_base_id kwd['base_id'] = cell_base_id
cell = cell_getter_method(*kw, **kwd) cell = cell_getter_method(*kw, **kwd)
REQUEST['cell'] = cell
cell_body = '' cell_body = ''
...@@ -308,9 +309,8 @@ class MatrixBoxWidget(Widget.Widget): ...@@ -308,9 +309,8 @@ class MatrixBoxWidget(Widget.Widget):
if cell != None: if cell != None:
attribute_value = my_field.get_value('default', attribute_value = my_field.get_value('default',
cell=cell, cell_index=kw, cell_position = (i,j,k)) cell=cell, cell_index=kw, cell_position = (i,j,k))
if render_format=='html': if render_format=='html':
REQUEST['cell'] = cell
display_value = attribute_value display_value = attribute_value
if field_errors.has_key(key): if field_errors.has_key(key):
...@@ -338,7 +338,6 @@ class MatrixBoxWidget(Widget.Widget): ...@@ -338,7 +338,6 @@ class MatrixBoxWidget(Widget.Widget):
attribute_value = my_field.get_value('default', cell=None, attribute_value = my_field.get_value('default', cell=None,
cell_index=kw, cell_position=(i,j,k)) cell_index=kw, cell_position=(i,j,k))
if render_format == 'html': if render_format == 'html':
REQUEST['cell'] = None
cell_body += str(my_field.render(value=attribute_value, cell_body += str(my_field.render(value=attribute_value,
REQUEST=REQUEST, key=key)) REQUEST=REQUEST, key=key))
elif render_format == 'list': elif render_format == 'list':
......
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