Commit eb929afe authored by Aurel's avatar Aurel

at least reindex inventory object in catalog


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17804 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c109551c
......@@ -97,14 +97,21 @@ class Inventory(Delivery):
to have our own temp object constructor, this is usefull if we
want to use some classes with some particular methods
"""
sql_catalog_id = kw.pop("sql_catalog_id", None)
disable_archive = kw.pop("disable_archive", 0)
if self.getSimulationState() in self.getPortalDraftOrderStateList():
# this prevent from trying to calculate stock
# with not all properties defined and thus making
# request with no condition in mysql
object_list = [self]
immediate_reindex_archive = sql_catalog_id is not None
self.portal_catalog.catalogObjectList(object_list,
sql_catalog_id = sql_catalog_id,
disable_archive=disable_archive,
immediate_reindex_archive=immediate_reindex_archive)
return
sql_catalog_id = kw.pop("sql_catalog_id", None)
disable_archive = kw.pop("disable_archive", 0)
connection_id = None
if sql_catalog_id is not None:
# try to get connection used in the catalog
......
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