Commit a66f040e authored by Rafael Monnerat's avatar Rafael Monnerat

use portal_catalog instead objectValues to list Web Page on Module

parent 8648c417
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</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>"""\n
Fetches Web Pages from the Web Page Module\n
"""\n
element_list = context.restrictedTraverse(\'/erp5/web_page_module\').objectValues()\n
\n
for sorted_element in sort_on:\n
element_list = sorted(element_list, key = lambda x: x.getProperty(sorted_element[0]), reverse = sorted_element[1] == \'descending\')\n
\n
return element_list\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>sort_on = [], **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>TestPageModule_listWebPages</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -15,10 +15,12 @@
<string>count_method</string>
<string>domain_root_list</string>
<string>domain_tree</string>
<string>editable_columns</string>
<string>lines</string>
<string>list_method</string>
<string>portal_types</string>
<string>selection_name</string>
<string>sort</string>
<string>sort_columns</string>
<string>title</string>
</list>
</value>
......@@ -167,10 +169,6 @@
<string>language</string>
<string>Language</string>
</tuple>
<tuple>
<string>int_index</string>
<string>Index</string>
</tuple>
<tuple>
<string>translated_validation_state_title</string>
<string>State</string>
......@@ -197,21 +195,6 @@
<key> <string>domain_tree</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>editable_columns</string> </key>
<value>
<list>
<tuple>
<string>creation_date</string>
<string>Creation Date</string>
</tuple>
<tuple>
<string>modification_date</string>
<string>Modification Date</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_list_mode_listbox</string> </value>
......@@ -230,9 +213,54 @@
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value>
<list>
<tuple>
<string>Web Page</string>
<string>Web Page</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>web_page_module_view_web_page_list_selection</string> </value>
<value> <string>test_page_view_web_page_list_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
<string>id</string>
<string>ID</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>sort_columns</string> </key>
<value>
<list>
<tuple>
<string>id</string>
<string>ID</string>
</tuple>
<tuple>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>short_title</string>
<string>Short Title</string>
</tuple>
<tuple>
<string>title</string>
<string>Long Title</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>target</string> </key>
......@@ -256,7 +284,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>TestPageModule_listWebPages</string> </value>
<value> <string>portal_catalog</string> </value>
</item>
</dictionary>
</pickle>
......
8
\ No newline at end of file
9
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment