[Erp5-report] r28992 - in /erp5/trunk/bt5/erp5_forge: PortalTypeBaseCategoryTemplateItem/ P...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Sep 11 22:51:49 CEST 2009
Author: kazuhiko
Date: Fri Sep 11 22:51:48 2009
New Revision: 28992
URL: http://svn.erp5.org?rev=28992&view=rev
Log:
2009-09-11 Kazuhiko
* use existing 'language' property instead of 'language' category for Glossary Terms.
* to migrate existing Glossary Terms, please use GlossaryTerm_getDuplicateGlossaryTermList script.
Added:
erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_migrateLanguageProperty.xml
Modified:
erp5/trunk/bt5/erp5_forge/PortalTypeBaseCategoryTemplateItem/base_category_list.xml
erp5/trunk/bt5/erp5_forge/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_viewGlossaryTermList/listbox.xml
erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryTerm_getDuplicateGlossaryTermList.xml
erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryTerm_view/my_language.xml
erp5/trunk/bt5/erp5_forge/bt/change_log
erp5/trunk/bt5/erp5_forge/bt/revision
erp5/trunk/bt5/erp5_forge/bt/template_action_path_list
erp5/trunk/bt5/erp5_forge/bt/template_base_category_list
erp5/trunk/bt5/erp5_forge/bt/template_path_list
erp5/trunk/bt5/erp5_forge/bt/template_portal_type_base_category_list
erp5/trunk/bt5/erp5_forge/bt/template_portal_type_property_sheet_list
Modified: erp5/trunk/bt5/erp5_forge/PortalTypeBaseCategoryTemplateItem/base_category_list.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/PortalTypeBaseCategoryTemplateItem/base_category_list.xml?rev=28992&r1=28991&r2=28992&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/PortalTypeBaseCategoryTemplateItem/base_category_list.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_forge/PortalTypeBaseCategoryTemplateItem/base_category_list.xml [utf8] Fri Sep 11 22:51:48 2009
@@ -11,7 +11,6 @@
<item>business_application</item>
</portal_type>
<portal_type id="Glossary Term">
- <item>language</item>
<item>causality</item>
<item>business_field</item>
</portal_type>
Modified: erp5/trunk/bt5/erp5_forge/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/PortalTypePropertySheetTemplateItem/property_sheet_list.xml?rev=28992&r1=28991&r2=28992&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/PortalTypePropertySheetTemplateItem/property_sheet_list.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_forge/PortalTypePropertySheetTemplateItem/property_sheet_list.xml [utf8] Fri Sep 11 22:51:48 2009
@@ -5,5 +5,7 @@
<portal_type id="Glossary Term">
<item>Comment</item>
<item>Reference</item>
+ <item>Version</item>
+ <item>DublinCore</item>
</portal_type>
</property_sheet_list>
Added: erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_migrateLanguageProperty.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_migrateLanguageProperty.xml?rev=28992&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_migrateLanguageProperty.xml (added)
+++ erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_migrateLanguageProperty.xml [utf8] Fri Sep 11 22:51:48 2009
@@ -1,0 +1,142 @@
+<?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># This script set language property according to existing language category.\n
+for i in context.getPortalObject().glossary_module.objectValues():\n
+ lang_list = [x.split(\'/\')[1] for x in i.categories if x.startswith(\'language/\')]\n
+ if len(lang_list):\n
+ lang = lang_list[0]\n
+ i.setLanguage(lang)\n
+ i.setCategoryList([x for x in i.categories if not x.startswith(\'language/\')])\n
+ print i.getPath(), lang\n
+print \'Migration finished.\'\n
+return printed\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string></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>_print_</string>
+ <string>_print</string>
+ <string>_getiter_</string>
+ <string>_getattr_</string>
+ <string>context</string>
+ <string>i</string>
+ <string>append</string>
+ <string>$append0</string>
+ <string>x</string>
+ <string>_getitem_</string>
+ <string>lang_list</string>
+ <string>len</string>
+ <string>lang</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>GlossaryModule_migrateLanguageProperty</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_viewGlossaryTermList/listbox.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_viewGlossaryTermList/listbox.xml?rev=28992&r1=28991&r2=28992&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_viewGlossaryTermList/listbox.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryModule_viewGlossaryTermList/listbox.xml [utf8] Fri Sep 11 22:51:48 2009
@@ -13,16 +13,16 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
+ <string>all_columns</string>
+ <string>columns</string>
+ <string>domain_root_list</string>
+ <string>domain_tree</string>
+ <string>portal_types</string>
+ <string>search_columns</string>
+ <string>selection_name</string>
+ <string>sort</string>
+ <string>sort_columns</string>
<string>title</string>
- <string>columns</string>
- <string>all_columns</string>
- <string>search_columns</string>
- <string>sort_columns</string>
- <string>sort</string>
- <string>selection_name</string>
- <string>portal_types</string>
- <string>domain_tree</string>
- <string>domain_root_list</string>
</list>
</value>
</item>
@@ -92,7 +92,7 @@
<string>Reference</string>
</tuple>
<tuple>
- <string>language_title</string>
+ <string>language</string>
<string>Language</string>
</tuple>
<tuple>
@@ -143,7 +143,7 @@
<string>Reference</string>
</tuple>
<tuple>
- <string>language_title</string>
+ <string>language</string>
<string>Language</string>
</tuple>
<tuple>
@@ -216,7 +216,7 @@
<string>Reference</string>
</tuple>
<tuple>
- <string>language_title</string>
+ <string>language</string>
<string>Language</string>
</tuple>
<tuple>
@@ -278,7 +278,7 @@
<string>Reference</string>
</tuple>
<tuple>
- <string>language_title</string>
+ <string>language</string>
<string>Language</string>
</tuple>
<tuple>
Modified: erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryTerm_getDuplicateGlossaryTermList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryTerm_getDuplicateGlossaryTermList.xml?rev=28992&r1=28991&r2=28992&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryTerm_getDuplicateGlossaryTermList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryTerm_getDuplicateGlossaryTermList.xml [utf8] Fri Sep 11 22:51:48 2009
@@ -57,7 +57,7 @@
portal_type=\'Glossary Term\',\n
reference=context.getReference(),\n
uid=\'!=%d\' % context.getUid(),\n
- language_uid=context.getLanguageUid(),\n
+ language=context.getLanguage(),\n
business_field_uid=context.getBusinessFieldUid(),\n
validation_state=(\'draft\', \'validated\'),\n
**kw)\n
Modified: erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryTerm_view/my_language.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryTerm_view/my_language.xml?rev=28992&r1=28991&r2=28992&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryTerm_view/my_language.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_glossary/GlossaryTerm_view/my_language.xml [utf8] Fri Sep 11 22:51:48 2009
@@ -13,8 +13,9 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
+ <string>description</string>
+ <string>display_width</string>
<string>title</string>
- <string>items</string>
</list>
</value>
</item>
@@ -65,12 +66,6 @@
<value> <string></string> </value>
</item>
<item>
- <key> <string>items</string> </key>
- <value>
- <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
- </value>
- </item>
- <item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
@@ -86,8 +81,12 @@
<value> <string>Language of the term</string> </value>
</item>
<item>
+ <key> <string>display_width</string> </key>
+ <value> <int>5</int> </value>
+ </item>
+ <item>
<key> <string>field_id</string> </key>
- <value> <string>my_category</string> </value>
+ <value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
@@ -107,20 +106,4 @@
</dictionary>
</pickle>
</record>
- <record id="2" aka="AAAAAAAAAAI=">
- <pickle>
- <tuple>
- <global name="TALESMethod" module="Products.Formulator.TALESField"/>
- <tuple/>
- </tuple>
- </pickle>
- <pickle>
- <dictionary>
- <item>
- <key> <string>_text</string> </key>
- <value> <string>python: here.portal_categories.language.getCategoryChildCompactLogicalPathItemList()</string> </value>
- </item>
- </dictionary>
- </pickle>
- </record>
</ZopeData>
Modified: erp5/trunk/bt5/erp5_forge/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/bt/change_log?rev=28992&r1=28991&r2=28992&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/bt/change_log [utf8] (original)
+++ erp5/trunk/bt5/erp5_forge/bt/change_log [utf8] Fri Sep 11 22:51:48 2009
@@ -1,5 +1,6 @@
-2009-09-11 yusuke
-* Fix a dependency that this business template must depends on erp5_base
+2009-09-11 Kazuhiko
+* use existing 'language' property instead of 'language' category for Glossary Terms.
+* to migrate existing Glossary Terms, please use GlossaryTerm_getDuplicateGlossaryTermList script.
2009-08-05 tatuya
* Fix 'Generate POT File' function when there is a PageTemplate which is using nested i18n block and using tal:repeat in the block
Modified: erp5/trunk/bt5/erp5_forge/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/bt/revision?rev=28992&r1=28991&r2=28992&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_forge/bt/revision [utf8] Fri Sep 11 22:51:48 2009
@@ -1,1 +1,1 @@
-493
+495
Modified: erp5/trunk/bt5/erp5_forge/bt/template_action_path_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/bt/template_action_path_list?rev=28992&r1=28991&r2=28992&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/bt/template_action_path_list [utf8] (original)
+++ erp5/trunk/bt5/erp5_forge/bt/template_action_path_list [utf8] Fri Sep 11 22:51:48 2009
@@ -3,7 +3,6 @@
Bug Line | view
Bug Module | view
Bug | document_list
-Bug | event_list
Bug | new_file
Bug | view
Business Template | commit
Modified: erp5/trunk/bt5/erp5_forge/bt/template_base_category_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/bt/template_base_category_list?rev=28992&r1=28991&r2=28992&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/bt/template_base_category_list [utf8] (original)
+++ erp5/trunk/bt5/erp5_forge/bt/template_base_category_list [utf8] Fri Sep 11 22:51:48 2009
@@ -3,5 +3,4 @@
bug_priority
bug_severity
bug_type
-business_field
-language
+business_field
Modified: erp5/trunk/bt5/erp5_forge/bt/template_path_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/bt/template_path_list?rev=28992&r1=28991&r2=28992&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/bt/template_path_list [utf8] (original)
+++ erp5/trunk/bt5/erp5_forge/bt/template_path_list [utf8] Fri Sep 11 22:51:48 2009
@@ -1,3 +1,2 @@
portal_alarms/open_bugs_alarm
-portal_categories/business_field/*
-portal_categories/language/*
+portal_categories/business_field/*
Modified: erp5/trunk/bt5/erp5_forge/bt/template_portal_type_base_category_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/bt/template_portal_type_base_category_list?rev=28992&r1=28991&r2=28992&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/bt/template_portal_type_base_category_list [utf8] (original)
+++ erp5/trunk/bt5/erp5_forge/bt/template_portal_type_base_category_list [utf8] Fri Sep 11 22:51:48 2009
@@ -5,5 +5,4 @@
Glossary Module | business_application
Glossary Term | business_field
Glossary Term | causality
-Glossary Term | language
Upload Module | business_application
Modified: erp5/trunk/bt5/erp5_forge/bt/template_portal_type_property_sheet_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/bt/template_portal_type_property_sheet_list?rev=28992&r1=28991&r2=28992&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/bt/template_portal_type_property_sheet_list [utf8] (original)
+++ erp5/trunk/bt5/erp5_forge/bt/template_portal_type_property_sheet_list [utf8] Fri Sep 11 22:51:48 2009
@@ -1,3 +1,5 @@
Bug | Bug
Glossary Term | Comment
-Glossary Term | Reference
+Glossary Term | DublinCore
+Glossary Term | Reference
+Glossary Term | Version
More information about the Erp5-report
mailing list