[Erp5-report] r28167 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jul 23 18:03:35 CEST 2009
Author: romain
Date: Thu Jul 23 18:03:34 2009
New Revision: 28167
URL: http://svn.erp5.org?rev=28167&view=rev
Log:
Fix my_related_object_list field on Base_viewMetadata, which accessed all related ZODB objects to display itself (which can lead to long transaction).
Instead, use a listbox with portal_catalog, which will only access displayed objects on the page.
Base_getRelatedObjectList was an unused script, so, no need to keep compatibility.
Added:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewMetadata/listbox.xml
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedObjectList.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewMetadata.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedObjectList.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedObjectList.xml?rev=28167&r1=28166&r2=28167&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedObjectList.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedObjectList.xml [utf8] Thu Jul 23 18:03:34 2009
@@ -53,11 +53,8 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string>category_tool = context.portal_categories\n
-base_category_list = kw.get(\'base_category_list\')\n
-portal_type = kw.get(\'portal_type\')\n
-\n
-return category_tool.getRelatedValueList(context, base_category_list, portal_type=portal_type)\n
+ <value> <string>kw[\'category.category_uid\'] = context.getUid()\n
+return context.portal_catalog(**kw)\n
</string> </value>
</item>
<item>
@@ -97,9 +94,8 @@
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
- <string>category_tool</string>
- <string>base_category_list</string>
- <string>portal_type</string>
+ <string>_write_</string>
+ <string>_apply_</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewMetadata.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewMetadata.xml?rev=28167&r1=28166&r2=28167&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewMetadata.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewMetadata.xml [utf8] Thu Jul 23 18:03:34 2009
@@ -55,6 +55,7 @@
<string>left</string>
<string>right</string>
<string>center</string>
+ <string>bottom</string>
</list>
</value>
</item>
@@ -63,11 +64,17 @@
<value>
<dictionary>
<item>
+ <key> <string>bottom</string> </key>
+ <value>
+ <list>
+ <string>listbox</string>
+ </list>
+ </value>
+ </item>
+ <item>
<key> <string>center</string> </key>
<value>
- <list>
- <string>my_related_object_list</string>
- </list>
+ <list/>
</value>
</item>
<item>
Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewMetadata/listbox.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewMetadata/listbox.xml?rev=28167&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewMetadata/listbox.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewMetadata/listbox.xml [utf8] Thu Jul 23 18:03:34 2009
@@ -1,0 +1,544 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="ListBox" module="Products.ERP5Form.ListBox"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>listbox</string> </value>
+ </item>
+ <item>
+ <key> <string>message_values</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>external_validator_failed</string> </key>
+ <value> <string>The input failed the external validator.</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>overrides</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>all_columns</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>alternate_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>anchor</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>columns</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>count_method</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>css_class</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>default_params</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>domain_root_list</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>domain_tree</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>editable</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>editable_columns</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>enabled</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>external_validator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>global_attributes</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>hidden</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>lines</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>list_action</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>list_method</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>meta_types</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>page_template</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>portal_types</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>report_root_list</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>report_tree</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>row_css_method</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>search</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>search_columns</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>select</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>selection_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>sort</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>sort_columns</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>stat_columns</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>stat_method</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>untranslatable_columns</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>url_columns</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>tales</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>all_columns</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>alternate_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>anchor</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>columns</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>count_method</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>css_class</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>default_params</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>domain_root_list</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>domain_tree</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>editable</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>editable_columns</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>enabled</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>external_validator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>global_attributes</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>hidden</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>lines</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>list_action</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>list_method</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>meta_types</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>page_template</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>portal_types</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>report_root_list</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>report_tree</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>row_css_method</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>search</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>search_columns</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>select</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>selection_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>sort</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>sort_columns</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>stat_columns</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>stat_method</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>untranslatable_columns</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>url_columns</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>values</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>all_columns</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>alternate_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>anchor</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>columns</string> </key>
+ <value>
+ <list>
+ <tuple>
+ <string>relative_url</string>
+ <string>Relative Url</string>
+ </tuple>
+ <tuple>
+ <string>title</string>
+ <string>Title</string>
+ </tuple>
+ <tuple>
+ <string>portal_type</string>
+ <string>Portal Type</string>
+ </tuple>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>count_method</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>css_class</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>default_params</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>domain_root_list</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>domain_tree</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>editable</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>editable_columns</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>enabled</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>external_validator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>global_attributes</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>hidden</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>lines</string> </key>
+ <value> <int>20</int> </value>
+ </item>
+ <item>
+ <key> <string>list_action</string> </key>
+ <value> <string>list</string> </value>
+ </item>
+ <item>
+ <key> <string>list_method</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+ </value>
+ </item>
+ <item>
+ <key> <string>meta_types</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>page_template</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>portal_types</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>report_root_list</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>report_tree</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>row_css_method</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>search</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>search_columns</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>select</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>selection_name</string> </key>
+ <value> <string>related_object_selection</string> </value>
+ </item>
+ <item>
+ <key> <string>sort</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>sort_columns</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>stat_columns</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>stat_method</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string>Related Object</string> </value>
+ </item>
+ <item>
+ <key> <string>untranslatable_columns</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>url_columns</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+ <record id="2" aka="AAAAAAAAAAI=">
+ <pickle>
+ <tuple>
+ <global name="Method" module="Products.Formulator.MethodField"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>method_name</string> </key>
+ <value> <string>Base_getRelatedObjectList</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=28167&r1=28166&r2=28167&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Thu Jul 23 18:03:34 2009
@@ -1,1 +1,1 @@
-1271
+1273
More information about the Erp5-report
mailing list