diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml index 8819e708cbae2760eb18ad1c0dc7de1b190b3ab3..dd96936279f7ae90b8b30e8c1079f83524e01d2f 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml @@ -147,6 +147,7 @@ def editMatrixBox(matrixbox_field, matrixbox):\n lines = []\n columns = []\n tabs = []\n + extra_dimension_list_list = []\n if as_cell_range_script_id:\n cell_range = getattr(matrix_context,\n as_cell_range_script_id)(matrixbox=True, base_id=cell_base_id)\n @@ -156,6 +157,11 @@ def editMatrixBox(matrixbox_field, matrixbox):\n lines, columns = cell_range\n elif len(cell_range) == 3:\n lines, columns, tabs = cell_range\n + elif len(cell_range) > 3:\n + lines = cell_range[0]\n + columns = cell_range[1]\n + tabs = cell_range[2]\n + extra_dimension_list_list = cell_range[3:]\n else:\n lines = matrixbox_field.get_value(\'lines\')\n columns = matrixbox_field.get_value(\'columns\')\n @@ -164,11 +170,13 @@ def editMatrixBox(matrixbox_field, matrixbox):\n column_ids = map(lambda x: x[0], columns)\n line_ids = map(lambda x: x[0], lines)\n tab_ids = map(lambda x: x[0], tabs)\n + extra_dimension_category_list_list = [[category for category, label in dimension_list] for dimension_list in extra_dimension_list_list]\n \n # There are 3 cases\n # Case 1: we do 1 dimensional matrix\n # Case 2: we do 2 dimensional matrix\n # Case 3: we do 2 dimensional matrix + tabs\n + # Case 4: we do 2 dimensional matrix + tabs + extra\n cell_range = matrix_context.getCellRange(base_id = cell_base_id)\n if (len(column_ids) == 0) or (column_ids[0] is None):\n matrixbox_cell_range = [line_ids]\n @@ -182,8 +190,10 @@ def editMatrixBox(matrixbox_field, matrixbox):\n \n else:\n matrixbox_cell_range = [line_ids, column_ids, tab_ids]\n + if extra_dimension_category_list_list:\n + matrixbox_cell_range = matrixbox_cell_range + extra_dimension_category_list_list\n if cell_range != matrixbox_cell_range:\n - matrix_context.setCellRange(line_ids, column_ids, tab_ids, base_id=cell_base_id)\n + matrix_context.setCellRange(base_id=cell_base_id, *matrixbox_cell_range)\n \n for k,v in matrixbox.items():\n # Only update cells which still exist\n diff --git a/product/ERP5/bootstrap/erp5_core/bt/change_log b/product/ERP5/bootstrap/erp5_core/bt/change_log index 79666df2b3cb1f9503f8862949315d21a5f66312..1cc59866cbdb8b3f50caa25d160561a4cb6d250b 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/change_log +++ b/product/ERP5/bootstrap/erp5_core/bt/change_log @@ -1,3 +1,6 @@ +2010-07-13 yusei +* Support more than four dimensional matrix. + 2010-07-02 Kazuhiko * Allow Manager to invoke validation_workflow's actions. diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index 48d20d9ccbab3882b71030993b94c54b53292f23..49d66a8bd35ab62f730934a4fe97601a7e174613 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -1625 \ No newline at end of file +1626 \ No newline at end of file