Commit c38c6e92 authored by Jérome Perrin's avatar Jérome Perrin

new category import by Thomas Nouret

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27079 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 87f44b77
...@@ -80,9 +80,10 @@ way that parent always precedes their children.\n ...@@ -80,9 +80,10 @@ way that parent always precedes their children.\n
"""\n """\n
from Products.ERP5Type.Message import translateString\n from Products.ERP5Type.Message import translateString\n
from Products.ERP5OOo.OOoUtils import OOoParser\n from Products.ERP5OOo.OOoUtils import OOoParser\n
from Products.ERP5Type.Document import newTempBase\n
parser = OOoParser()\n parser = OOoParser()\n
categories_spreadsheet_mapping = dict()\n category_list_spreadsheet_mapping = dict()\n
\n error_list = []\n
\n \n
def default_invalid_spreadsheet_error_handler(error_message):\n def default_invalid_spreadsheet_error_handler(error_message):\n
raise ValueError(error_message)\n raise ValueError(error_message)\n
...@@ -151,12 +152,12 @@ else:\n ...@@ -151,12 +152,12 @@ else:\n
\n \n
# Extract tables from the speadsheet file\n # Extract tables from the speadsheet file\n
filename = parser.getFilename()\n filename = parser.getFilename()\n
spreadsheets = parser.getSpreadsheetsMapping(no_empty_lines=True)\n spreadsheet_list = parser.getSpreadsheetsMapping(no_empty_lines=True)\n
\n \n
\n \n
for table_name in spreadsheets.keys():\n for table_name in spreadsheet_list.keys():\n
# Get the header of the table\n # Get the header of the table\n
columns_header = spreadsheets[table_name][0]\n columns_header = spreadsheet_list[table_name][0]\n
# Get the mapping to help us know the property according a cell index\n # Get the mapping to help us know the property according a cell index\n
property_map = {}\n property_map = {}\n
column_index = 0\n column_index = 0\n
...@@ -191,14 +192,19 @@ for table_name in spreadsheets.keys():\n ...@@ -191,14 +192,19 @@ for table_name in spreadsheets.keys():\n
# 1 table = 1 base category\n # 1 table = 1 base category\n
base_category_name = table_name\n base_category_name = table_name\n
base_category_id = getIDFromString(base_category_name)\n base_category_id = getIDFromString(base_category_name)\n
categories = categories_spreadsheet_mapping.setdefault(base_category_id, [])\n if same_type(base_category_name, u\'\'):\n
categories.append({ \'path\' : base_category_id\n base_category_name = base_category_name.encode(\'utf8\')\n
if same_type(base_category_id, u\'\'):\n
base_category_id = base_category_id.encode(\'utf8\')\n
category_list = category_list_spreadsheet_mapping.setdefault(base_category_id, [])\n
category_list.append({ \'path\' : base_category_id\n
, \'title\': base_category_name\n , \'title\': base_category_name\n
})\n })\n
\n \n
# This path_elements help us to reconstruct the absolute path\n # This path_element_list help us to reconstruct the absolute path\n
path_elements = []\n path_element_list = []\n
for line in spreadsheets[table_name][1:]:\n line_index = 2\n
for line in spreadsheet_list[table_name][1:]:\n
\n \n
# Exclude empty lines\n # Exclude empty lines\n
if line.count(\'\') + line.count(None) == len(line):\n if line.count(\'\') + line.count(None) == len(line):\n
...@@ -214,7 +220,7 @@ for table_name in spreadsheets.keys():\n ...@@ -214,7 +220,7 @@ for table_name in spreadsheets.keys():\n
cell_index += 1\n cell_index += 1\n
\n \n
# Analyse every cell of the line\n # Analyse every cell of the line\n
category_properties = {}\n category_property_list = {}\n
cell_index = 0\n cell_index = 0\n
for (property_id, cell_data) in line_data.items():\n for (property_id, cell_data) in line_data.items():\n
\n \n
...@@ -239,7 +245,7 @@ for table_name in spreadsheets.keys():\n ...@@ -239,7 +245,7 @@ for table_name in spreadsheets.keys():\n
if not property_id.startswith(\'path_\'):\n if not property_id.startswith(\'path_\'):\n
if same_type(cell_data, u\'\'):\n if same_type(cell_data, u\'\'):\n
cell_data = cell_data.encode(\'utf8\')\n cell_data = cell_data.encode(\'utf8\')\n
category_properties[property_id] = cell_data\n category_property_list[property_id] = cell_data\n
# Handle \'path\' property\n # Handle \'path\' property\n
else:\n else:\n
path_element_id = cell_id\n path_element_id = cell_id\n
...@@ -250,7 +256,7 @@ for table_name in spreadsheets.keys():\n ...@@ -250,7 +256,7 @@ for table_name in spreadsheets.keys():\n
# Get a path element for each depth level to reach the 0-level\n # Get a path element for each depth level to reach the 0-level\n
for searched_depth in range(element_depth)[::-1]:\n for searched_depth in range(element_depth)[::-1]:\n
# Get the first path element that correspond to the searched depth\n # Get the first path element that correspond to the searched depth\n
for element in path_elements[::-1]:\n for element in path_element_list[::-1]:\n
if element[\'depth\'] == searched_depth:\n if element[\'depth\'] == searched_depth:\n
# Element found, add it to the list\n # Element found, add it to the list\n
absolut_path_element_list.append(element[\'value\'])\n absolut_path_element_list.append(element[\'value\'])\n
...@@ -259,35 +265,46 @@ for table_name in spreadsheets.keys():\n ...@@ -259,35 +265,46 @@ for table_name in spreadsheets.keys():\n
path = \'/\'.join([base_category_id,] + absolut_path_element_list[::-1])\n path = \'/\'.join([base_category_id,] + absolut_path_element_list[::-1])\n
if same_type(path, u\'\'):\n if same_type(path, u\'\'):\n
path = path.encode(\'utf8\')\n path = path.encode(\'utf8\')\n
category_properties[\'path\'] = path\n category_property_list[\'path\'] = path\n
\n \n
# Save the current raw path item value as title if no title column defined\n # Save the current raw path item value as title if no title column defined\n
if \'title\' not in category_properties.keys():\n if \'title\' not in category_property_list.keys():\n
clean_title = cell_data.strip()\n clean_title = cell_data.strip()\n
# Only set title if it look like a title\n # Only set title if it look like a title\n
# (i.e. its tranformation to ID is not the same as the original value)\n # (i.e. its tranformation to ID is not the same as the original value)\n
if clean_title != cell_id:\n if clean_title != cell_id:\n
category_properties[\'title\'] = clean_title\n category_property_list[\'title\'] = clean_title\n
\n \n
# Detect invalid IDs\n # Detect invalid IDs\n
if path_element_id in property_id_list:\n if path_element_id in property_id_list:\n
invalid_spreadsheet_error_handler(translateString(\n if simulation_mode:\n
"The ID ${id} is invalid, it\'s a reserved property name",\n error = newTempBase(context, \'item\')\n
mapping=dict(id=path_element_id)))\n error.edit(field_type = \'Invalid ID\', field_category = path_element_id, field_message = translateString("The ID ${id} in ${table} at line ${line} is invalid, it\'s a reserved property name",mapping=dict(id=path_element_id, table=table_name, line=line_index)))\n
error_list.append(error)\n
else:\n
return invalid_spreadsheet_error_handler(translateString("The ID ${id} in ${table} at line ${line} is invalid, it\'s a reserved property name",mapping=dict(id=path_element_id, table=table_name, line=line_index)))\n
\n
\n
\n \n
# Detect duplicate IDs\n # Detect duplicate IDs\n
for element in path_elements[::-1]:\n for element in path_element_list[::-1]:\n
if element[\'depth\'] != element_depth:\n if element[\'depth\'] != element_depth:\n
break\n break\n
if element[\'value\'] == path_element_id:\n if element[\'value\'] == path_element_id:\n
invalid_spreadsheet_error_handler(\n if simulation_mode:\n
translateString("Duplicate id found: ${id}",\n error = newTempBase(context, \'item\')\n
mapping=dict(id=element[\'value\'])))\n error.edit(field_type = \'Duplicate ID\', field_category = element[\'value\'], field_message = translateString("Duplicate ID ${id} found in ${table} at line ${line} ", mapping=dict(id=element[\'value\'], table=table_name, line=line_index)))\n
error_list.append(error)\n
else:\n
return invalid_spreadsheet_error_handler( \n
translateString("Duplicate id found in ${table} at line ${line} : ${id}",\n
mapping=dict(id=element[\'value\'], table=table_name, line=line_index)))\n
\n
\n \n
# Detect wrong hierarchy\n # Detect wrong hierarchy\n
if path_elements:\n if path_element_list:\n
current_depth = element_depth\n current_depth = element_depth\n
for element in path_elements[::-1]:\n for element in path_element_list[::-1]:\n
if element[\'depth\'] > current_depth:\n if element[\'depth\'] > current_depth:\n
break # we are now on another branch\n break # we are now on another branch\n
if element[\'depth\'] == current_depth:\n if element[\'depth\'] == current_depth:\n
...@@ -296,24 +313,33 @@ for table_name in spreadsheets.keys():\n ...@@ -296,24 +313,33 @@ for table_name in spreadsheets.keys():\n
current_depth = element[\'depth\']\n current_depth = element[\'depth\']\n
continue # we are on the direct parent (current level - 1)\n continue # we are on the direct parent (current level - 1)\n
else:\n else:\n
invalid_spreadsheet_error_handler(\n if simulation_mode:\n
error = newTempBase(context, \'item\')\n
error.edit(field_type = \'Wrong hierarchy\', field_category = path_element_id, field_message = translateString("Wrong hierarchy found for ID ${id} and ${depth} in ${table} at line ${line} " ,mapping=dict(id=path_element_id,depth=element_depth, table=table_name, line=line_index)))\n
error_list.append(error) \n
else: \n
return invalid_spreadsheet_error_handler(\n
translateString(\n translateString(\n
"Wrong hierarchy found for ID ${id} and depth ${depth}",\n "Wrong hierarchy found for ID ${id} and depth ${depth} in ${table} at line ${line} ",\n
mapping=dict(id=path_element_id,\n mapping=dict(id=path_element_id,\n
depth=element_depth)))\n depth=element_depth, table=table_name, line=line_index)))\n
\n \n
\n
\n
# Save the path element\n # Save the path element\n
path_elements.append({ \'depth\': element_depth\n path_element_list.append({ \'depth\': element_depth\n
, \'value\': path_element_id\n , \'value\': path_element_id\n
})\n })\n
\n \n
# Proceed to next cell\n # Proceed to next cell\n
cell_index += 1\n cell_index += 1\n
\n line_index += 1\n
if len(category_properties) > 0 and \'path\' in category_properties.keys():\n if len(category_property_list) > 0 and \'path\' in category_property_list.keys():\n
categories.append(category_properties)\n category_list.append(category_property_list)\n
\n if error_list:\n
return categories_spreadsheet_mapping\n return {\'error_list\':error_list}\n
else:\n
return category_list_spreadsheet_mapping\n
]]></string> </value> ]]></string> </value>
...@@ -326,7 +352,7 @@ return categories_spreadsheet_mapping\n ...@@ -326,7 +352,7 @@ return categories_spreadsheet_mapping\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>import_file, invalid_spreadsheet_error_handler=None</string> </value> <value> <string>import_file, invalid_spreadsheet_error_handler=None, simulation_mode=False</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -346,7 +372,7 @@ return categories_spreadsheet_mapping\n ...@@ -346,7 +372,7 @@ return categories_spreadsheet_mapping\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>2</int> </value> <value> <int>3</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
...@@ -354,13 +380,17 @@ return categories_spreadsheet_mapping\n ...@@ -354,13 +380,17 @@ return categories_spreadsheet_mapping\n
<tuple> <tuple>
<string>import_file</string> <string>import_file</string>
<string>invalid_spreadsheet_error_handler</string> <string>invalid_spreadsheet_error_handler</string>
<string>simulation_mode</string>
<string>Products.ERP5Type.Message</string> <string>Products.ERP5Type.Message</string>
<string>translateString</string> <string>translateString</string>
<string>Products.ERP5OOo.OOoUtils</string> <string>Products.ERP5OOo.OOoUtils</string>
<string>OOoParser</string> <string>OOoParser</string>
<string>Products.ERP5Type.Document</string>
<string>newTempBase</string>
<string>parser</string> <string>parser</string>
<string>dict</string> <string>dict</string>
<string>categories_spreadsheet_mapping</string> <string>category_list_spreadsheet_mapping</string>
<string>error_list</string>
<string>default_invalid_spreadsheet_error_handler</string> <string>default_invalid_spreadsheet_error_handler</string>
<string>None</string> <string>None</string>
<string>_getattr_</string> <string>_getattr_</string>
...@@ -370,7 +400,6 @@ return categories_spreadsheet_mapping\n ...@@ -370,7 +400,6 @@ return categories_spreadsheet_mapping\n
<string>getIDFromString</string> <string>getIDFromString</string>
<string>content_type</string> <string>content_type</string>
<string>hasattr</string> <string>hasattr</string>
<string>Products.ERP5Type.Document</string>
<string>newTempOOoDocument</string> <string>newTempOOoDocument</string>
<string>tmp_ooo</string> <string>tmp_ooo</string>
<string>_getiter_</string> <string>_getiter_</string>
...@@ -379,7 +408,7 @@ return categories_spreadsheet_mapping\n ...@@ -379,7 +408,7 @@ return categories_spreadsheet_mapping\n
<string>str</string> <string>str</string>
<string>filename</string> <string>filename</string>
<string>True</string> <string>True</string>
<string>spreadsheets</string> <string>spreadsheet_list</string>
<string>table_name</string> <string>table_name</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>columns_header</string> <string>columns_header</string>
...@@ -393,19 +422,20 @@ return categories_spreadsheet_mapping\n ...@@ -393,19 +422,20 @@ return categories_spreadsheet_mapping\n
<string>_inplacevar_</string> <string>_inplacevar_</string>
<string>base_category_name</string> <string>base_category_name</string>
<string>base_category_id</string> <string>base_category_id</string>
<string>categories</string> <string>same_type</string>
<string>path_elements</string> <string>category_list</string>
<string>path_element_list</string>
<string>line_index</string>
<string>line</string> <string>line</string>
<string>len</string> <string>len</string>
<string>cell_index</string> <string>cell_index</string>
<string>line_data</string> <string>line_data</string>
<string>cell</string> <string>cell</string>
<string>property_id</string> <string>property_id</string>
<string>category_properties</string> <string>category_property_list</string>
<string>cell_data</string> <string>cell_data</string>
<string>cell_id</string> <string>cell_id</string>
<string>alt_id_source</string> <string>alt_id_source</string>
<string>same_type</string>
<string>path_element_id</string> <string>path_element_id</string>
<string>absolut_path_element_list</string> <string>absolut_path_element_list</string>
<string>int</string> <string>int</string>
...@@ -415,6 +445,7 @@ return categories_spreadsheet_mapping\n ...@@ -415,6 +445,7 @@ return categories_spreadsheet_mapping\n
<string>element</string> <string>element</string>
<string>path</string> <string>path</string>
<string>clean_title</string> <string>clean_title</string>
<string>error</string>
<string>current_depth</string> <string>current_depth</string>
</tuple> </tuple>
</value> </value>
...@@ -429,6 +460,7 @@ return categories_spreadsheet_mapping\n ...@@ -429,6 +460,7 @@ return categories_spreadsheet_mapping\n
<value> <value>
<tuple> <tuple>
<none/> <none/>
<int>0</int>
</tuple> </tuple>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>return context.REQUEST.other.get(\'category_import_report\', [])\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>CategoryTool_getImportReportFromRequest</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -55,17 +55,8 @@ ...@@ -55,17 +55,8 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.Message import translateString\n <value> <string>from Products.ERP5Type.Message import translateString\n
from Products.ERP5Type.Document import newTempBase\n from Products.ERP5Type.Document import newTempBase\n
from Products.ERP5Type.DateUtils import getIntervalBetweenDates\n
\n \n
# Initialise some general variables\n # Initialise some general variables\n
import_file = context.REQUEST[\'import_file\']\n
update_existing_property = context.REQUEST[\'update_existing_property\']\n
detailed_report = context.REQUEST[\'detailed_report\']\n
simulation_mode = context.REQUEST[\'simulation_mode\']\n
displayed_report = context.REQUEST[\'displayed_report\']\n
effective_date = context.REQUEST[\'effective_date\']\n
expiration_date = context.REQUEST[\'expiration_date\']\n
existing_category_list = context.REQUEST[\'existing_category_list\']\n
detailed_report_result = []\n detailed_report_result = []\n
detailed_report_append = detailed_report_result.append\n detailed_report_append = detailed_report_result.append\n
base_category_id_list = []\n base_category_id_list = []\n
...@@ -123,8 +114,10 @@ def invalid_category_spreadsheet_handler(message):\n ...@@ -123,8 +114,10 @@ def invalid_category_spreadsheet_handler(message):\n
\n \n
category_list_spreadsheet_mapping = context.Base_getCategoriesSpreadSheetMapping(import_file,\n category_list_spreadsheet_mapping = context.Base_getCategoriesSpreadSheetMapping(import_file,\n
invalid_spreadsheet_error_handler=invalid_category_spreadsheet_handler, simulation_mode=simulation_mode)\n invalid_spreadsheet_error_handler=invalid_category_spreadsheet_handler, simulation_mode=simulation_mode)\n
\n
if category_list_spreadsheet_mapping.has_key(\'error_list\'):\n if category_list_spreadsheet_mapping.has_key(\'error_list\'):\n
return category_list_spreadsheet_mapping[\'error_list\']\n context.REQUEST.other[\'category_import_report\'] = category_list_spreadsheet_mapping[\'error_list\']\n
return context.CategoryTool_viewImportReport()\n
\n \n
for base_category, category_list in \\\n for base_category, category_list in \\\n
category_list_spreadsheet_mapping.items():\n category_list_spreadsheet_mapping.items():\n
...@@ -223,7 +216,9 @@ for base_category, category_list in \\\n ...@@ -223,7 +216,9 @@ for base_category, category_list in \\\n
report_line.edit(field_type = \'\', field_category = \'\', field_message = translateString("Updated ${key} with value ${value} ", mapping=dict(key=key, value=value))) \n report_line.edit(field_type = \'\', field_category = \'\', field_message = translateString("Updated ${key} with value ${value} ", mapping=dict(key=key, value=value))) \n
detailed_report_append(report_line)\n detailed_report_append(report_line)\n
elif value not in (\'\', None) and not new_category.hasProperty(key):\n elif value not in (\'\', None) and not new_category.hasProperty(key):\n
context.log(new_category.getProperty(key))\n
# Only set properties which are not already defined\n # Only set properties which are not already defined\n
context.log(new_category.hasProperty(key))\n
category_update_dict[key] = value\n category_update_dict[key] = value\n
if \'updated\' in displayed_report:\n if \'updated\' in displayed_report:\n
if first_update_reported:\n if first_update_reported:\n
...@@ -302,7 +297,8 @@ if not simulation_mode:\n ...@@ -302,7 +297,8 @@ if not simulation_mode:\n
\n \n
if (detailed_report or simulation_mode) and detailed_report_result:\n if (detailed_report or simulation_mode) and detailed_report_result:\n
# Return a detailed report if requested\n # Return a detailed report if requested\n
return detailed_report_result\n context.REQUEST.other[\'category_import_report\'] = detailed_report_result\n
return context.CategoryTool_viewImportReport()\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
return context.REQUEST.RESPONSE.redirect(\n return context.REQUEST.RESPONSE.redirect(\n
...@@ -331,7 +327,7 @@ return context.REQUEST.RESPONSE.redirect(\n ...@@ -331,7 +327,7 @@ return context.REQUEST.RESPONSE.redirect(\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>**kw</string> </value> <value> <string>import_file, update_existing_property=False, keep_existing_category=True, detailed_report=False, simulation_mode=False, displayed_report=[], effective_date, expiration_date, existing_category_list=\'keep\', **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -351,35 +347,33 @@ return context.REQUEST.RESPONSE.redirect(\n ...@@ -351,35 +347,33 @@ return context.REQUEST.RESPONSE.redirect(\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>0</int> </value> <value> <int>9</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>kw</string>
<string>Products.ERP5Type.Message</string>
<string>translateString</string>
<string>Products.ERP5Type.Document</string>
<string>newTempBase</string>
<string>Products.ERP5Type.DateUtils</string>
<string>getIntervalBetweenDates</string>
<string>_getitem_</string>
<string>_getattr_</string>
<string>context</string>
<string>import_file</string> <string>import_file</string>
<string>update_existing_property</string> <string>update_existing_property</string>
<string>keep_existing_category</string>
<string>detailed_report</string> <string>detailed_report</string>
<string>simulation_mode</string> <string>simulation_mode</string>
<string>displayed_report</string> <string>displayed_report</string>
<string>effective_date</string> <string>effective_date</string>
<string>expiration_date</string> <string>expiration_date</string>
<string>existing_category_list</string> <string>existing_category_list</string>
<string>kw</string>
<string>Products.ERP5Type.Message</string>
<string>translateString</string>
<string>Products.ERP5Type.Document</string>
<string>newTempBase</string>
<string>detailed_report_result</string> <string>detailed_report_result</string>
<string>_getattr_</string>
<string>detailed_report_append</string> <string>detailed_report_append</string>
<string>base_category_id_list</string> <string>base_category_id_list</string>
<string>category_path_dict</string> <string>category_path_dict</string>
<string>simulation_new_category_id_list</string> <string>simulation_new_category_id_list</string>
<string>context</string>
<string>property_id_list</string> <string>property_id_list</string>
<string>AttributeError</string> <string>AttributeError</string>
<string>report_line</string> <string>report_line</string>
...@@ -396,6 +390,8 @@ return context.REQUEST.RESPONSE.redirect(\n ...@@ -396,6 +390,8 @@ return context.REQUEST.RESPONSE.redirect(\n
<string>filename</string> <string>filename</string>
<string>invalid_category_spreadsheet_handler</string> <string>invalid_category_spreadsheet_handler</string>
<string>category_list_spreadsheet_mapping</string> <string>category_list_spreadsheet_mapping</string>
<string>_getitem_</string>
<string>_write_</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>base_category</string> <string>base_category</string>
<string>category_list</string> <string>category_list</string>
...@@ -416,7 +412,6 @@ return context.REQUEST.RESPONSE.redirect(\n ...@@ -416,7 +412,6 @@ return context.REQUEST.RESPONSE.redirect(\n
<string>category_type</string> <string>category_type</string>
<string>dict</string> <string>dict</string>
<string>None</string> <string>None</string>
<string>_write_</string>
<string>new_category</string> <string>new_category</string>
<string>category_update_dict</string> <string>category_update_dict</string>
<string>first_update_reported</string> <string>first_update_reported</string>
...@@ -438,7 +433,16 @@ return context.REQUEST.RESPONSE.redirect(\n ...@@ -438,7 +433,16 @@ return context.REQUEST.RESPONSE.redirect(\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple>
<int>0</int>
<int>1</int>
<int>0</int>
<int>0</int>
<list/>
<none/> <none/>
<none/>
<string>keep</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</item> </item>
<item> <item>
<key> <string>action</string> </key> <key> <string>action</string> </key>
<value> <string>CategoryTool_viewImportReport</string> </value> <value> <string>CategoryTool_importCategoryFile</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
......
...@@ -220,23 +220,23 @@ ...@@ -220,23 +220,23 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>Kept categories</string> <string>Kept Categories</string>
<string>kept</string> <string>kept</string>
</tuple> </tuple>
<tuple> <tuple>
<string>Expired categories</string> <string>Expired Categories</string>
<string>expired</string> <string>expired</string>
</tuple> </tuple>
<tuple> <tuple>
<string>Deleted categories</string> <string>Deleted Categories</string>
<string>deleted</string> <string>deleted</string>
</tuple> </tuple>
<tuple> <tuple>
<string>Created categories</string> <string>Created Categories</string>
<string>created</string> <string>created</string>
</tuple> </tuple>
<tuple> <tuple>
<string>Updated categories</string> <string>Updated Categories</string>
<string>updated</string> <string>updated</string>
</tuple> </tuple>
<tuple> <tuple>
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>What do you want to see in your Report?</string> </value> <value> <string>What Do You Want To See In Your Report?</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
......
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Effective date</string> </value> <value> <string>Effective Date</string> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
......
...@@ -223,15 +223,15 @@ ...@@ -223,15 +223,15 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>Keep categories</string> <string>Keep Categories</string>
<string>keep</string> <string>keep</string>
</tuple> </tuple>
<tuple> <tuple>
<string>Expire categories</string> <string>Expire Categories</string>
<string>expire</string> <string>expire</string>
</tuple> </tuple>
<tuple> <tuple>
<string>Delete categories</string> <string>Delete Categories</string>
<string>delete</string> <string>delete</string>
</tuple> </tuple>
</list> </list>
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>What to do with existing categories?</string> </value> <value> <string>What To Do With Existing Categories?</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
......
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Expiration date (optional)</string> </value> <value> <string>Expiration Date (Optional)</string> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
......
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Simulation mode</string> </value> <value> <string>Simulation Mode</string> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
......
...@@ -83,9 +83,7 @@ ...@@ -83,9 +83,7 @@
<item> <item>
<key> <string>center</string> </key> <key> <string>center</string> </key>
<value> <value>
<list> <list/>
<string>listbox</string>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -97,7 +95,9 @@ ...@@ -97,7 +95,9 @@
<item> <item>
<key> <string>left</string> </key> <key> <string>left</string> </key>
<value> <value>
<list/> <list>
<string>listbox</string>
</list>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -451,10 +451,6 @@ ...@@ -451,10 +451,6 @@
<key> <string>report_tree</string> </key> <key> <string>report_tree</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item>
<key> <string>row_css_method</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>search</string> </key> <key> <string>search</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
...@@ -541,7 +537,7 @@ ...@@ -541,7 +537,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>method_name</string> </key> <key> <string>method_name</string> </key>
<value> <string>CategoryTool_importCategoryFile</string> </value> <value> <string>CategoryTool_getImportReportFromRequest</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
1205 1206
\ 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