Commit 78806e2c authored by Romain Courteaud's avatar Romain Courteaud

CategoryTool_importCategoryFile can now import an int_index columns.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9917 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cfd54e46
...@@ -230,8 +230,11 @@ for table_name in spreadsheets.keys():\n ...@@ -230,8 +230,11 @@ for table_name in spreadsheets.keys():\n
if value not in (\'\', None):\n if value not in (\'\', None):\n
if hasattr(new_category, method_id):\n if hasattr(new_category, method_id):\n
method = getattr(new_category, method_id)\n method = getattr(new_category, method_id)\n
# Convert the value to something like \'\\xc3\\xa9\' not \'\\xc3\\xa9\'\n if key != \'int_index\':\n
method(value.encode(\'UTF-8\'))\n # Convert the value to something like \'\\xc3\\xa9\' not \'\\xc3\\xa9\'\n
method(value.encode(\'UTF-8\'))\n
else:\n
method(int(value))\n
\n \n
\n \n
# Import is a success, go back to the portal_categories tool\n # Import is a success, go back to the portal_categories tool\n
......
73 75
\ No newline at end of file \ No newline at end of file
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