diff --git a/product/ERP5/skins/erp5_html_style/form_list_ui.pt b/product/ERP5/skins/erp5_html_style/form_list_ui.pt index 0256b9676fb3b6291e3e3bcf6561f4f6e65bc393..22ba4129e9443998b25ddacb8ba68f952baf94db 100755 --- a/product/ERP5/skins/erp5_html_style/form_list_ui.pt +++ b/product/ERP5/skins/erp5_html_style/form_list_ui.pt @@ -107,11 +107,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. <select name="stat_columns"> <span tal:repeat="stat stats"> - <span tal:condition="python: stat == selected_stats[row_index - 1]" tal:on-error="string: row_index"> + <span tal:condition="python: len(selected_stats) >= row_index and stat == selected_stats[row_index - 1]" tal:on-error="string: row_index"> <option tal:content="stat" tal:attributes="value stat" value="None" selected> </option> </span> - <span tal:condition="python: stat != selected_stats[row_index - 1]" tal:on-error="string: row_index"> + <span tal:condition="python: len(selected_stats) < row_index or stat != selected_stats[row_index - 1]" tal:on-error="string: row_index"> <option tal:content="stat" tal:attributes="value stat" value="None"> </option> </span>