[Erp5-report] r23088 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Aug 21 16:38:13 CEST 2008
Author: jerome
Date: Thu Aug 21 16:38:12 2008
New Revision: 23088
URL: http://svn.erp5.org?rev=23088&view=rev
Log:
get portal_types from the proxified listbox
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedObjectParameter.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewRelatedObjectList/listbox.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedObjectParameter.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedObjectParameter.xml?rev=23088&r1=23087&r2=23088&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedObjectParameter.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedObjectParameter.xml Thu Aug 21 16:38:12 2008
@@ -68,6 +68,7 @@
<value> <string># This script is used in order to retrieve parameter in the listbox Displayed\n
# by Base_viewRelatedObjectList from the relation field\n
result = None\n
+\n
if parameter is not None:\n
listbox = getattr(context, context.REQUEST.form_id, None).get_field( context.REQUEST.field_id )\n
dialog_id = listbox.get_value(\'relation_form_id\') or \'Base_viewRelatedObjectList\'\n
@@ -77,6 +78,20 @@
if parameter == \'proxy_listbox_ids\':\n
return context.REQUEST.get(\'proxy_listbox_ids\', [])\n
result = getattr(context, dialog_id, None).get_field( \'listbox\' ).get_orig_value(parameter)\n
+\n
+ if parameter == \'portal_type\':\n
+ portal_type = listbox.get_value(\'portal_type\')\n
+ proxied_listbox = None\n
+ relation_field_proxy_listbox = context.Base_getRelationFieldProxyListBoxId()\n
+ if relation_field_proxy_listbox != \\\n
+ \'Base_viewRelatedObjectListBase/listbox\':\n
+ proxied_listbox = context.restrictedTraverse(\n
+ relation_field_proxy_listbox, None)\n
+ if proxied_listbox is None:\n
+ return portal_type\n
+ \n
+ proxied_listbox_portal_type = proxied_listbox.get_value(\'portal_types\')\n
+ return [x for x in proxied_listbox_portal_type if x in portal_type]\n
\n
return result\n
</string> </value>
@@ -136,6 +151,14 @@
<string>context</string>
<string>listbox</string>
<string>dialog_id</string>
+ <string>portal_type</string>
+ <string>proxied_listbox</string>
+ <string>relation_field_proxy_listbox</string>
+ <string>proxied_listbox_portal_type</string>
+ <string>append</string>
+ <string>$append0</string>
+ <string>_getiter_</string>
+ <string>x</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewRelatedObjectList/listbox.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewRelatedObjectList/listbox.xml?rev=23088&r1=23087&r2=23088&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewRelatedObjectList/listbox.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewRelatedObjectList/listbox.xml Thu Aug 21 16:38:12 2008
@@ -18,6 +18,7 @@
<string>list_method</string>
<string>count_method</string>
<string>selection_name</string>
+ <string>portal_types</string>
<string>search</string>
<string>select</string>
<string>editable_columns</string>
@@ -72,6 +73,18 @@
<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_columns</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
<key> <string>field_id</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
@@ -88,14 +101,40 @@
<value> <string></string> </value>
</item>
<item>
+ <key> <string>portal_types</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
+ </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>search</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>
- <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
- </value>
+ <persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
+ </value>
+ </item>
+ <item>
+ <key> <string>stat_columns</string> </key>
+ <value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
@@ -123,23 +162,23 @@
</value>
</item>
<item>
- <key> <string>count_method</string> </key>
- <value>
- <persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
- </value>
- </item>
- <item>
- <key> <string>domain_root_list</string> </key>
- <value>
- <list/>
- </value>
- </item>
- <item>
- <key> <string>domain_tree</string> </key>
+ <key> <string>count_method</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
+ </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_columns</string> </key>
+ <key> <string>editable_columns</string> </key>
<value>
<list/>
</value>
@@ -161,19 +200,25 @@
<value> <string>SEARCH_LIST</string> </value>
</item>
<item>
- <key> <string>list_method</string> </key>
- <value>
- <persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
- </value>
- </item>
- <item>
- <key> <string>report_root_list</string> </key>
- <value>
- <list/>
- </value>
- </item>
- <item>
- <key> <string>report_tree</string> </key>
+ <key> <string>list_method</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
+ </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>
@@ -181,25 +226,25 @@
<value> <int>0</int> </value>
</item>
<item>
- <key> <string>search</string> </key>
+ <key> <string>search</string> </key>
<value> <int>1</int> </value>
</item>
<item>
- <key> <string>select</string> </key>
+ <key> <string>select</string> </key>
<value> <int>1</int> </value>
</item>
<item>
- <key> <string>selection_name</string> </key>
+ <key> <string>selection_name</string> </key>
<value> <string>Base_viewRelatedObjectList</string> </value>
</item>
<item>
- <key> <string>sort</string> </key>
- <value>
- <list/>
- </value>
- </item>
- <item>
- <key> <string>stat_columns</string> </key>
+ <key> <string>sort</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>stat_columns</string> </key>
<value>
<list/>
</value>
@@ -209,7 +254,7 @@
<value> <string>Click to edit the target</string> </value>
</item>
<item>
- <key> <string>title</string> </key>
+ <key> <string>title</string> </key>
<value> <string>Related Objects</string> </value>
</item>
<item>
@@ -265,12 +310,28 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
+ <value> <string>python: here.Base_getRelatedObjectParameter(parameter=\'portal_type\')</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+ <record id="5" aka="AAAAAAAAAAU=">
+ <pickle>
+ <tuple>
+ <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_text</string> </key>
<value> <string>python: here.Base_getRelatedObjectParameter(parameter=\'sort\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
- <record id="5" aka="AAAAAAAAAAU=">
+ <record id="6" aka="AAAAAAAAAAY=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
@@ -286,7 +347,7 @@
</dictionary>
</pickle>
</record>
- <record id="6" aka="AAAAAAAAAAY=">
+ <record id="7" aka="AAAAAAAAAAc=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
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=23088&r1=23087&r2=23088&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision Thu Aug 21 16:38:12 2008
@@ -1,1 +1,1 @@
-935
+936
More information about the Erp5-report
mailing list