diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedObjectParameter.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedObjectParameter.xml index 7017e96a1d1dd20485b916290160b4dfd6ef80ef..bae26632497e6bd4ae087e29c067757532ce17a0 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedObjectParameter.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedObjectParameter.xml @@ -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 is not None:\n 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 @@ return result\n <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> diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewRelatedObjectList/listbox.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewRelatedObjectList/listbox.xml index 4ac893cbe92a56bef260734181babbb5b62394c1..dbf9cb9392affb1b6d6e187ec0751bff6aa487dd 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewRelatedObjectList/listbox.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewRelatedObjectList/listbox.xml @@ -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> @@ -71,6 +72,18 @@ <key> <string>count_method</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_columns</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>field_id</string> </key> <value> @@ -87,6 +100,28 @@ <key> <string>list_method</string> </key> <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> @@ -94,9 +129,13 @@ <item> <key> <string>sort</string> </key> <value> - <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> + <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> <value> <string></string> </value> @@ -123,23 +162,23 @@ </value> </item> <item> - <key> <string>count_method</string> </key> + <key> <string>count_method</string> </key> <value> - <persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent> </value> </item> <item> - <key> <string>domain_root_list</string> </key> + <key> <string>domain_root_list</string> </key> <value> <list/> </value> </item> <item> - <key> <string>domain_tree</string> </key> + <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> + <key> <string>list_method</string> </key> <value> - <persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent> </value> </item> <item> - <key> <string>report_root_list</string> </key> + <key> <string>portal_types</string> </key> <value> <list/> </value> </item> <item> - <key> <string>report_tree</string> </key> + <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> + <key> <string>sort</string> </key> <value> <list/> </value> </item> <item> - <key> <string>stat_columns</string> </key> + <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=\'sort\')</string> </value> + <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="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"/> diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index 9597ee0e6b5efb51990180c8f920e7905c9a3b64..1fb6394a79f96c1e678be0e1f9feb5f82b42723c 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -935 \ No newline at end of file +936 \ No newline at end of file