Commit 90ff09d8 authored by Łukasz Nowak's avatar Łukasz Nowak

- revert 36994 for now as it generates a lot of issues and requires...

 - revert 36994 for now as it generates a lot of issues and requires additional coding to make it work


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37007 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ca7a1a2c
......@@ -74,6 +74,14 @@ class Container(Movement, XMLObject):
, PropertySheet.SortIndex
)
def reindexObject(self, *args, **kw):
"""Reindex container and children
Children must be reindexed because PackingList.isPacked use the catalog
to find them.
"""
self.recursiveReindexObject(*args, **kw)
security.declareProtected(Permissions.AccessContentsInformation,
'getQuantity')
def getQuantity(self, default=1.0):
......
......@@ -466,6 +466,17 @@ class Delivery(XMLObject, ImmobilisationDelivery, CompositionMixin):
movement_relative_url_list=detached_movement_url_list)
#######################################################
# Defer indexing process
def reindexObject(self, *k, **kw):
"""
Reindex children and simulation
"""
self.recursiveReindexObject(*k, **kw)
# 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')
#######################################################
# Stock Management
def _getMovementResourceList(self):
......
......@@ -240,6 +240,10 @@ class DeliveryLine(Movement, XMLObject, XMLMatrix, Variated,
# And apply
getattr(my_simulation_movement.getObject(), method_id)()
def reindexObject(self, *k, **kw):
"""Reindex children"""
self.recursiveReindexObject(*k, **kw)
security.declareProtected(Permissions.AccessContentsInformation, 'getInventoriatedQuantity')
def getInventoriatedQuantity(self):
"""
......
......@@ -38,15 +38,6 @@ class RecursiveReindexInteractor(Interactor):
from Products.ERP5.Document.TradeCondition import TradeCondition
self.on(TradeCondition.reindexObject).doAfter(self.recursiveReindexObject)
from Products.ERP5.Document.Delivery import Delivery
self.on(Delivery.reindexObject).doAfter(self.recursiveReindexObject)
from Products.ERP5.Document.Container import Container
self.on(Container.reindexObject).doAfter(self.recursiveReindexObject)
from Products.ERP5.Document.DeliveryLine import DeliveryLine
self.on(DeliveryLine.reindexObject).doAfter(self.recursiveReindexObject)
def recursiveReindexObject(self, method_call_object, *args, **kw):
"""
Reindex content inside
......
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