diff --git a/product/ERP5/Document/Inventory.py b/product/ERP5/Document/Inventory.py index f8411969950225a399986922a1b7723fc8a15c26..eecb8435a8337e8fbf4ac5a564dc0ebe892d03ec 100755 --- a/product/ERP5/Document/Inventory.py +++ b/product/ERP5/Document/Inventory.py @@ -34,6 +34,9 @@ from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface from Products.ERP5Type.XMLObject import XMLObject class Inventory(XMLObject): + """ + Why is not Inventory subclass of Delivery ???? XXX + """ # CMF Type Definition meta_type = 'ERP5 Inventory' portal_type = 'Inventory' @@ -143,3 +146,15 @@ une liste de mouvements...""" def getDelivery(self): 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')