Commit 7626ca30 authored by Julien Muchembled's avatar Julien Muchembled

fixup! inventory: fix indexation when erp5_stock_cache is not installed

parent 205b9a0e
......@@ -335,9 +335,9 @@ class Inventory(Delivery):
disable_cache=1, check_uid=0, disable_archive=disable_archive,
immediate_reindex_archive=immediate_reindex_archive)
method_id_list = ['z0_uncatalog_stock']
script_id = 'SQLCatalog_trimInventoryCacheOnCatalog'
if getattr(portal, script_id, None) is not None:
method_id_list.append(script_id)
if portal.portal_catalog.getSQLCatalog(sql_catalog_id) \
.hasObject('SQLCatalog_trimInventoryCacheOnCatalog'):
method_id_list.append('SQLCatalog_trimInventoryCacheOnCatalog')
# Delete existing stock records and old inventory_cache first.
portal.portal_catalog.catalogObjectList(
stock_object_list[:], method_id_list=method_id_list, **kw)
......
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