Commit 0c582a6a authored by Gabriel Monnerat's avatar Gabriel Monnerat Committed by Jérome Perrin

erp5_officejs_support_request_ui: Avoid to hardcode sort_on in the python script

Because this breaks the sort and filter buttons in the new ERP5 UI
parent 6dd228a4
if 'sort_on' in kw:
del kw['sort_on']
return context.searchFolder(sort_on=[
('modification_date', 'descending'),
# XXX to get stable test result, we also sort by start date (because modification date
# has a one second precision)
('delivery.start_date', 'descending'),
], **kw)
<?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>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Folder_searchFolderSortByReferenceDescending</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -345,7 +345,16 @@ ...@@ -345,7 +345,16 @@
<item> <item>
<key> <string>sort</string> </key> <key> <string>sort</string> </key>
<value> <value>
<list/> <list>
<tuple>
<string>modification_date</string>
<string>descending</string>
</tuple>
<tuple>
<string>delivery.start_date</string>
<string>descending</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -376,7 +385,7 @@ ...@@ -376,7 +385,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>method_name</string> </key> <key> <string>method_name</string> </key>
<value> <string>Folder_searchFolderSortByReferenceDescending</string> </value> <value> <string>searchFolder</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
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