erp5_core: Fix ListMode view for ListBox with several tabs.
1. On Tab1, from PurchaseSupply_view, click on 'Purchase Supply Lines': Base_viewListMode??proxy_form_id=PurchaseSupply_view&proxy_field_id=listbox This Python Script initialise 'list_mode_proxy_selection' with the above 2 GET parameters and then displays PurchaseSupply_view.listbox indirectly but current Form is Base_viewListModeRenderer. 2. On Tab2, from SaleSupply_view, click on 'Sale Supply Lines': Base_viewListMode?proxy_form_id=SaleSupply_view&proxy_field_id=listbox This Python Script initialise 'list_mode_proxy_selection' with the above 2 GET parameters and then displays SaleSupply_view.listbox indirectly but current Form is Base_viewListModeRenderer. 3. On Tab1, filter Purchase Supply Lines. As proxy_form_id and proxy_field_id are not given, then Base_viewListModeRender fallbacks on 'list_mode_proxy_selection' values to find out the Form ID to be called and wrongly display SaleSupply_view.listbox (2.).
Showing
... | ... | @@ -162,7 +162,7 @@ |
<dictionary> | ||
<item> | ||
<key> <string>_text</string> </key> | ||
<value> <string>request/proxy_field_id | python: context.portal_selections.getSelectionParamsFor(\'list_mode_proxy_selection\').get(\'proxy_field_id\', \'listbox\')</string> </value> | ||
<value> <string>request/proxy_field_id | python: context.portal_selections.getSelectionParamsFor(\'%s_list_mode_proxy_selection\' % context.REQUEST.get(\'selection_name\', \'\')).get(\'proxy_field_id\', \'listbox\')</string> </value> | ||
</item> | ||
</dictionary> | ||
</pickle> | ||
... | ... | @@ -175,7 +175,7 @@ |
<dictionary> | ||
<item> | ||
<key> <string>_text</string> </key> | ||
<value> <string>request/proxy_form_id | python: context.portal_selections.getSelectionParamsFor(\'list_mode_proxy_selection\').get(\'proxy_form_id\', \'Folder_viewContentList\')</string> </value> | ||
<value> <string>request/proxy_form_id | python: context.portal_selections.getSelectionParamsFor(\'%s_list_mode_proxy_selection\' % context.REQUEST.get(\'selection_name\', \'\')).get(\'proxy_form_id\', \'Folder_viewContentList\')</string> </value> | ||
|
||
</item> | ||
</dictionary> | ||
</pickle> | ||
... | ... | @@ -201,7 +201,7 @@ |
<dictionary> | ||
<item> | ||
<key> <string>_text</string> </key> | ||
<value> <string>request/proxy_form_id | python: context.portal_selections.getSelectionParamsFor(\'list_mode_proxy_selection\').get(\'proxy_form_id\', \'Folder_viewContentList\')</string> </value> | ||
<value> <string>request/proxy_form_id | python: context.portal_selections.getSelectionParamsFor(\'%s_list_mode_proxy_selection\' % context.REQUEST.get(\'selection_name\', \'\')).get(\'proxy_form_id\', \'Folder_viewContentList\')</string> </value> | ||
</item> | ||
</dictionary> | ||
</pickle> | ||
... | ... |
-
This commit make a new bug in erp5.
How to reproduce:
go to a person > go to assignments tab > click on assignment list title > click on next page ... nothing appears ...
It seems that proxy_form_id, proxy_field_id and proxy_selection_name are not sent by clicking on next page.
-
I fixed it by setting selection name in tales:
python: '%s_%s_selection' % ( request.get("proxy_form_id") or context.portal_selections.getSelectionParamsFor('%s_list_mode_proxy_selection' % context.REQUEST.get('selection_name', '')).get('proxy_form_id', 'Folder_viewContentList'), request.get("proxy_field_id") or context.portal_selections.getSelectionParamsFor('%s_list_mode_proxy_selection' % context.REQUEST.get('selection_name', '')).get('proxy_field_id', 'listbox') )
I need to add a test now