Commit 57b9a344 authored by Jean-Paul Smets's avatar Jean-Paul Smets

implement recursive reindex


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@116 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dc437490
...@@ -34,6 +34,9 @@ from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface ...@@ -34,6 +34,9 @@ from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
class Inventory(XMLObject): class Inventory(XMLObject):
"""
Why is not Inventory subclass of Delivery ???? XXX
"""
# CMF Type Definition # CMF Type Definition
meta_type = 'ERP5 Inventory' meta_type = 'ERP5 Inventory'
portal_type = 'Inventory' portal_type = 'Inventory'
...@@ -143,3 +146,15 @@ une liste de mouvements...""" ...@@ -143,3 +146,15 @@ une liste de mouvements..."""
def getDelivery(self): def getDelivery(self):
return self.getRelativeUrl() return self.getRelativeUrl()
#######################################################
# Defer indexing process
def reindexObject(self, *k, **kw):
"""
Reindex children and simulation
"""
if self.isIndexable:
# Reindex children
self.activate().recursiveImmediateReindexObject()
# NEW: we never rexpand simulation - This is a task for DSolver / TSolver
# Make sure expanded simulation is still OK (expand and reindex)
# self.activate().applyToDeliveryRelatedMovement(method_id = 'expand')
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