Commit 82617884 authored by Julien Muchembled's avatar Julien Muchembled

Update catalog filters to take advantage of last optimisations in ZSQLCatalog

* Use 'context' instead of 'here'.
* Use 'portal_type' as expression cache key.
* Use is.*Type accessors.

This commit requires [32324].

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32337 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 059c8374
......@@ -6,8 +6,9 @@
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: isInventory</value>
<value>python: context.isInventory()</value>
</item>
<item key="_filter_type_archive" type="tuple">
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
\ No newline at end of file
......@@ -6,8 +6,9 @@
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: isInventoryMovement</value>
<value>python: context.isInventoryMovement()</value>
</item>
<item key="_filter_type_archive" type="tuple">
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
\ No newline at end of file
......@@ -6,8 +6,9 @@
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python:getattr(here, 'getVersion', None) is not None</value>
<value>python: getattr(context, 'getVersion', None) is not None</value>
</item>
<item key="_filter_type_archive" type="tuple">
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
\ No newline at end of file
......@@ -6,9 +6,9 @@
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value></value>
<value>python: context.isAlarmType()</value>
</item>
<item key="_filter_type_archive" type="tuple">
<value>Alarm</value>
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
\ No newline at end of file
......@@ -6,8 +6,9 @@
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: isDelivery</value>
<value>python: context.isDelivery()</value>
</item>
<item key="_filter_type_archive" type="tuple">
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
\ No newline at end of file
......@@ -6,8 +6,9 @@
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: here.providesIMovement()</value>
<value>python: context.providesIMovement()</value>
</item>
<item key="_filter_type_archive" type="tuple">
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
......@@ -6,8 +6,9 @@
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: here.getPortalType() in here.getPortalResourceTypeList()</value>
<value>python: context.isResourceType()</value>
</item>
<item key="_filter_type_archive" type="tuple">
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
\ No newline at end of file
......@@ -6,8 +6,9 @@
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: here.providesIMovement()</value>
<value>python: context.providesIMovement()</value>
</item>
<item key="_filter_type_archive" type="tuple">
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
......@@ -6,8 +6,9 @@
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: here.providesIMovement()</value>
<value>python: context.providesIMovement()</value>
</item>
<item key="_filter_type_archive" type="tuple">
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
......@@ -6,8 +6,9 @@
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: not here.providesIMovement()</value>
<value>python: not context.providesIMovement()</value>
</item>
<item key="_filter_type_archive" type="tuple">
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
......@@ -6,8 +6,9 @@
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: isPredicate</value>
<value>python: context.isPredicate()</value>
</item>
<item key="_filter_type_archive" type="tuple">
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
\ No newline at end of file
......@@ -6,8 +6,9 @@
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: isPredicate</value>
<value>python: context.isPredicate()</value>
</item>
<item key="_filter_type_archive" type="tuple">
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
\ No newline at end of file
......@@ -6,8 +6,9 @@
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: here.getPortalType() in here.getPortalResourceTypeList()</value>
<value>python: context.isResourceType()</value>
</item>
<item key="_filter_type_archive" type="tuple">
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
\ No newline at end of file
......@@ -6,8 +6,9 @@
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: here.providesIMovement() and not isInventoryMovement</value>
<value>python: context.providesIMovement() and not context.isInventoryMovement()</value>
</item>
<item key="_filter_type_archive" type="tuple">
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
......@@ -150,19 +150,19 @@
</value>
</item>
<item>
<key> <string>isInventoryMovement</string> </key>
<key> <string>isCancellationAmount</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>isMovement</string> </key>
<key> <string>isInventoryMovement</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>isCancellationAmount</string> </key>
<key> <string>isMovement</string> </key>
<value>
<dictionary/>
</value>
......
......@@ -6,8 +6,9 @@
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python:getattr(here, 'getVersion', None) is not None</value>
<value>python: getattr(context, 'getVersion', None) is not None</value>
</item>
<item key="_filter_type_archive" type="tuple">
<item key="_filter_expression_cache_key_archive" type="tuple">
<value>portal_type</value>
</item>
</catalog_method>
\ No newline at end of file
172
\ No newline at end of file
173
\ 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