diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_getModulePortalTypeSortedPropertyList.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_getModulePortalTypeSortedPropertyList.xml index 8a4376be2b8f1d37f4da219b7ed661589dcce85d..ba2acee7e08aa3d5bac9a385e006f648199b2a3e 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_getModulePortalTypeSortedPropertyList.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_getModulePortalTypeSortedPropertyList.xml @@ -62,11 +62,10 @@ for portal_type in module.allowedContentTypes():\n #property_string = "%s.%s" % (portal_type.id, property[\'id\'])\n #property_list.append(property_string)\n for property in portal_type.getInstancePropertyAndBaseCategoryList():\n - property_string = "%s.%s" % (portal_type.id, property)\n - property_list.append(property_string)\n + property_list.append((portal_type.id, property))\n \n property_list.sort()\n -return [(\'-- Ignore this Property --\', \'\')] + map(lambda x: (x,x), property_list)\n +return [(\'-- Ignore this Property --\', \'\')] + map(lambda x: (x[1], \'%s.%s\' % (x[0], x[1])), property_list)\n </string> </value> </item> <item> @@ -110,7 +109,6 @@ return [(\'-- Ignore this Property --\', \'\')] + map(lambda x: (x,x), property_ <string>_getattr_</string> <string>portal_type</string> <string>property</string> - <string>property_string</string> <string>map</string> </tuple> </value> diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_importObjectFromOOo.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_importObjectFromOOo.xml index f99b81160c147d79af3baf94a9210e23a84f5628..51528afe749b3fc522a3b4c684fc9f83b7f5fb97 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_importObjectFromOOo.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_importObjectFromOOo.xml @@ -53,9 +53,7 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string encoding="cdata"><![CDATA[ - -"""\n + <value> <string>"""\n This script is an alpha version of what should be a generic OpenOffice importer,\n which is a collection of scripts and UI to import lots of objects to ERP5\n from a spreadsheet. The idea is to let the user map each spreadsheet column with\n @@ -127,7 +125,7 @@ else:\n map_item = { \'portal_type\': portal_type_property.split(\'.\')[0]\n , \'property\' : portal_type_property.split(\'.\')[1]\n }\n - if spreadsheet_name not in mapping.keys():\n + if spreadsheet_name not in mapping:\n mapping[spreadsheet_name] = {}\n mapping[spreadsheet_name][column_name] = map_item\n \n @@ -139,7 +137,7 @@ else:\n \n # Build a data structure to associate column index with column title\n column_index = {}\n - for column_id in range(len(sheet_data[0])):\n + for column_id in xrange(len(sheet_data[0])):\n column_index[column_id] = sheet_data[0][column_id]\n \n # Build a data structure to associate column index with object property and portal type\n @@ -154,8 +152,8 @@ else:\n object_list = {}\n for line in sheet_data[1:]:\n new_object_property_dict = {}\n - for line_property_index in range(len(line)):\n - if line_property_index in column_mapping.keys():\n + for line_property_index in xrange(len(line)):\n + if line_property_index in column_mapping:\n property_module = sheet_module\n property_module_url = property_module.getRelativeUrl()\n property_pt = column_mapping[line_property_index][\'portal_type\']\n @@ -171,7 +169,7 @@ else:\n # Create a new property value\n new_object_property_dict[property_id] = property_value\n \n - if len(new_object_property_dict.keys()) > 0:\n + if new_object_property_dict:\n object_list[property_module_url][property_pt].append(new_object_property_dict)\n \n context.activate(tag="object_OOo_import", priority=1, activity="SQLQueue").ERP5Site_importObjectFromOOoActivity(object_list=object_list)\n @@ -179,9 +177,7 @@ else:\n return request.RESPONSE.redirect(context.absolute_url() + \'/view?portal_status_message=OpenOffice+document+importing.\')\n \n return context.ERP5Site_importObjectFromOOoFastInput(REQUEST=request)\n - - -]]></string> </value> +</string> </value> </item> <item> <key> <string>_code</string> </key> @@ -248,7 +244,7 @@ return context.ERP5Site_importObjectFromOOoFastInput(REQUEST=request)\n <string>sheet_data</string> <string>sheet_module</string> <string>column_index</string> - <string>range</string> + <string>xrange</string> <string>column_id</string> <string>column_mapping</string> <string>property_dict</string> diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_importObjectFromOOoFastInput/openoffice_template.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_importObjectFromOOoFastInput/openoffice_template.xml index 38b02f72ad5e20bdb04f7b96349883096fa5fb5b..04398d522b154e4bff70139f61bcd60beb9bb7e4 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_importObjectFromOOoFastInput/openoffice_template.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_importObjectFromOOoFastInput/openoffice_template.xml @@ -3,7 +3,7 @@ <record id="1" aka="AAAAAAAAAAE="> <pickle> <tuple> - <global name="StringField" module="Products.Formulator.StandardFields"/> + <global name="EditorField" module="Products.ERP5Form.EditorField"/> <tuple/> </tuple> </pickle> @@ -21,13 +21,21 @@ <key> <string>external_validator_failed</string> </key> <value> <string>The input failed the external validator.</string> </value> </item> + <item> + <key> <string>line_too_long</string> </key> + <value> <string>A line was too long.</string> </value> + </item> <item> <key> <string>required_not_found</string> </key> <value> <string>Input is required but no input given.</string> </value> </item> <item> <key> <string>too_long</string> </key> - <value> <string>Too much input was given.</string> </value> + <value> <string>You entered too many characters.</string> </value> + </item> + <item> + <key> <string>too_many_lines</string> </key> + <value> <string>You entered too many lines.</string> </value> </item> </dictionary> </value> @@ -52,14 +60,6 @@ <key> <string>description</string> </key> <value> <string></string> </value> </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <string></string> </value> - </item> <item> <key> <string>editable</string> </key> <value> <string></string> </value> @@ -76,6 +76,10 @@ <key> <string>extra</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>height</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>hidden</string> </key> <value> <string></string> </value> @@ -84,16 +88,24 @@ <key> <string>max_length</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>max_linelength</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_lines</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>required</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>title</string> </key> + <key> <string>text_editor</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>truncate</string> </key> + <key> <string>title</string> </key> <value> <string></string> </value> </item> <item> @@ -104,6 +116,10 @@ <key> <string>whitespace_preserve</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>width</string> </key> + <value> <string></string> </value> + </item> </dictionary> </value> </item> @@ -127,23 +143,13 @@ <key> <string>description</string> </key> <value> <string></string> </value> </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <string></string> </value> - </item> <item> <key> <string>editable</string> </key> <value> <string></string> </value> </item> <item> <key> <string>enabled</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> - </value> + <value> <string></string> </value> </item> <item> <key> <string>external_validator</string> </key> @@ -153,6 +159,10 @@ <key> <string>extra</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>height</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>hidden</string> </key> <value> <string></string> </value> @@ -161,16 +171,24 @@ <key> <string>max_length</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>max_linelength</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_lines</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>required</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>title</string> </key> + <key> <string>text_editor</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>truncate</string> </key> + <key> <string>title</string> </key> <value> <string></string> </value> </item> <item> @@ -181,6 +199,10 @@ <key> <string>whitespace_preserve</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>width</string> </key> + <value> <string></string> </value> + </item> </dictionary> </value> </item> @@ -208,14 +230,6 @@ You can find an OpenOffice template at <a href="openoffice-erp5-objects-template <key> <string>description</string> </key> <value> <string></string> </value> </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <int>20</int> </value> - </item> <item> <key> <string>editable</string> </key> <value> <int>0</int> </value> @@ -232,6 +246,10 @@ You can find an OpenOffice template at <a href="openoffice-erp5-objects-template <key> <string>extra</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>height</string> </key> + <value> <int>5</int> </value> + </item> <item> <key> <string>hidden</string> </key> <value> <int>0</int> </value> @@ -240,49 +258,42 @@ You can find an OpenOffice template at <a href="openoffice-erp5-objects-template <key> <string>max_length</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>max_linelength</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_lines</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>required</string> </key> <value> <int>0</int> </value> </item> <item> - <key> <string>title</string> </key> - <value> <string>OpenOffice Source File Example</string> </value> + <key> <string>text_editor</string> </key> + <value> <string>text_area</string> </value> </item> <item> - <key> <string>truncate</string> </key> - <value> <int>0</int> </value> + <key> <string>title</string> </key> + <value> <string>OpenOffice Source File Example</string> </value> </item> <item> <key> <string>unicode</string> </key> - <value> <int>1</int> </value> + <value> <int>0</int> </value> </item> <item> <key> <string>whitespace_preserve</string> </key> <value> <int>0</int> </value> </item> + <item> + <key> <string>width</string> </key> + <value> <int>40</int> </value> + </item> </dictionary> </value> </item> </dictionary> </pickle> </record> - <record id="2" aka="AAAAAAAAAAI="> - <pickle> - <tuple> - <tuple> - <string>Products.Formulator.TALESField</string> - <string>TALESMethod</string> - </tuple> - <none/> - </tuple> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_text</string> </key> - <value> <string>python: not here.REQUEST.get(\'OOOIMPORT_STEP_TWO\', False)</string> </value> - </item> - </dictionary> - </pickle> - </record> </ZopeData> diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_importObjectFromOOoFastInput/warning.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_importObjectFromOOoFastInput/warning.xml index 33d61b3c73799684d2f349dd717bef19a2bcdbd3..82204e1cbb82b03c271daba5f5ee851505f537b5 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_importObjectFromOOoFastInput/warning.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_importObjectFromOOoFastInput/warning.xml @@ -3,7 +3,7 @@ <record id="1" aka="AAAAAAAAAAE="> <pickle> <tuple> - <global name="StringField" module="Products.Formulator.StandardFields"/> + <global name="EditorField" module="Products.ERP5Form.EditorField"/> <tuple/> </tuple> </pickle> @@ -21,13 +21,21 @@ <key> <string>external_validator_failed</string> </key> <value> <string>The input failed the external validator.</string> </value> </item> + <item> + <key> <string>line_too_long</string> </key> + <value> <string>A line was too long.</string> </value> + </item> <item> <key> <string>required_not_found</string> </key> <value> <string>Input is required but no input given.</string> </value> </item> <item> <key> <string>too_long</string> </key> - <value> <string>Too much input was given.</string> </value> + <value> <string>You entered too many characters.</string> </value> + </item> + <item> + <key> <string>too_many_lines</string> </key> + <value> <string>You entered too many lines.</string> </value> </item> </dictionary> </value> @@ -52,14 +60,6 @@ <key> <string>description</string> </key> <value> <string></string> </value> </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <string></string> </value> - </item> <item> <key> <string>editable</string> </key> <value> <string></string> </value> @@ -76,6 +76,10 @@ <key> <string>extra</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>height</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>hidden</string> </key> <value> <string></string> </value> @@ -84,16 +88,24 @@ <key> <string>max_length</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>max_linelength</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_lines</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>required</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>title</string> </key> + <key> <string>text_editor</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>truncate</string> </key> + <key> <string>title</string> </key> <value> <string></string> </value> </item> <item> @@ -104,6 +116,10 @@ <key> <string>whitespace_preserve</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>width</string> </key> + <value> <string></string> </value> + </item> </dictionary> </value> </item> @@ -127,23 +143,13 @@ <key> <string>description</string> </key> <value> <string></string> </value> </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <string></string> </value> - </item> <item> <key> <string>editable</string> </key> <value> <string></string> </value> </item> <item> <key> <string>enabled</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> - </value> + <value> <string></string> </value> </item> <item> <key> <string>external_validator</string> </key> @@ -153,6 +159,10 @@ <key> <string>extra</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>height</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>hidden</string> </key> <value> <string></string> </value> @@ -161,16 +171,24 @@ <key> <string>max_length</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>max_linelength</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_lines</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>required</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>title</string> </key> + <key> <string>text_editor</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>truncate</string> </key> + <key> <string>title</string> </key> <value> <string></string> </value> </item> <item> @@ -181,6 +199,10 @@ <key> <string>whitespace_preserve</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>width</string> </key> + <value> <string></string> </value> + </item> </dictionary> </value> </item> @@ -208,21 +230,13 @@ <key> <string>description</string> </key> <value> <string></string> </value> </item> - <item> - <key> <string>display_maxwidth</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>display_width</string> </key> - <value> <int>20</int> </value> - </item> <item> <key> <string>editable</string> </key> <value> <int>0</int> </value> </item> <item> <key> <string>enabled</string> </key> - <value> <int>0</int> </value> + <value> <int>1</int> </value> </item> <item> <key> <string>external_validator</string> </key> @@ -232,6 +246,10 @@ <key> <string>extra</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>height</string> </key> + <value> <int>5</int> </value> + </item> <item> <key> <string>hidden</string> </key> <value> <int>0</int> </value> @@ -240,49 +258,42 @@ <key> <string>max_length</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>max_linelength</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_lines</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>required</string> </key> <value> <int>0</int> </value> </item> <item> - <key> <string>title</string> </key> - <value> <string>Warning</string> </value> + <key> <string>text_editor</string> </key> + <value> <string>text_area</string> </value> </item> <item> - <key> <string>truncate</string> </key> - <value> <int>0</int> </value> + <key> <string>title</string> </key> + <value> <string>Warning</string> </value> </item> <item> <key> <string>unicode</string> </key> - <value> <int>1</int> </value> + <value> <int>0</int> </value> </item> <item> <key> <string>whitespace_preserve</string> </key> <value> <int>0</int> </value> </item> + <item> + <key> <string>width</string> </key> + <value> <int>40</int> </value> + </item> </dictionary> </value> </item> </dictionary> </pickle> </record> - <record id="2" aka="AAAAAAAAAAI="> - <pickle> - <tuple> - <tuple> - <string>Products.Formulator.TALESField</string> - <string>TALESMethod</string> - </tuple> - <none/> - </tuple> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_text</string> </key> - <value> <string>python: here.REQUEST.get(\'OOOIMPORT_STEP_TWO\', False)</string> </value> - </item> - </dictionary> - </pickle> - </record> </ZopeData> diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/openoffice-erp5-objects-template.sxc.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/openoffice-erp5-objects-template.sxc.xml index bd1845faaad2c5a1a0ae001f079966f8fb815299..36ef304fbf0e7ccfa88f0661e25ea2914c5be265 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/openoffice-erp5-objects-template.sxc.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/openoffice-erp5-objects-template.sxc.xml @@ -9,6 +9,10 @@ </pickle> <pickle> <dictionary> + <item> + <key> <string>_Cacheable__manager_id</string> </key> + <value> <string>http_cache</string> </value> + </item> <item> <key> <string>_EtagSupport__etag</string> </key> <value> <string>ts47455675.31</string> </value> diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision index b1ce634589a4522510dafef5c9c9cd5e7f199a6d..55a318f19d9be5830ef50c209e49d77e1896a772 100644 --- a/bt5/erp5_base/bt/revision +++ b/bt5/erp5_base/bt/revision @@ -1 +1 @@ -550 \ No newline at end of file +551 \ No newline at end of file