Commit 7ebf17d4 authored by Jérome Perrin's avatar Jérome Perrin

Remove getMovementIndex


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7707 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a493bd61
......@@ -180,26 +180,6 @@ class AppliedRule(XMLObject):
return rule.getSolverList(self)
return ()
# Optimized Reindexing
security.declareProtected(Permissions.View, 'getMovementIndex')
def getMovementIndex(self):
"""
Returns a list of indexable movements
"""
result = [ { 'uid' : self.getUid(),
'id' : self.getId(),
'portal_type' : self.getPortalType(),
'url' : self.getUrl(),
'relative_url' : self.getRelativeUrl(),
'parent_uid' : self.getParentUid(),
'simulation_state' : None,
'causality_uid' : self.getCausalityUid(),
'specialise_uid' : self.getSpecialiseUid(),
} ]
for m in self.objectValues():
result.extend(m.getMovementIndex())
return result
security.declareProtected(Permissions.AccessContentsInformation,
'isRootAppliedRule')
def isRootAppliedRule(self):
......@@ -218,9 +198,6 @@ class AppliedRule(XMLObject):
return self
return self.getParentValue().getRootAppliedRule()
# Psyco optimizations
psyco.bind(getMovementIndex)
security.declareProtected(Permissions.ModifyPortalContent,
'notifySimulationChange')
def notifySimulationChange(self, notify_dict):
......
......@@ -252,52 +252,6 @@ class SimulationMovement(Movement):
#diverge = WorkflowMethod(diverge) USELESS NOW
# isDivergent is defined in movement
# Optimized Reindexing
security.declareProtected( Permissions.AccessContentsInformation,
'getMovementIndex')
def getMovementIndex(self):
"""
Returns a list of indexable movements
"""
result = [ { 'uid' : self.getUid(),
'id' : self.getId(),
'portal_type' : self.getPortalType(),
'url' : self.getUrl(),
'relative_url' : self.getRelativeUrl(),
'parent_uid' : self.getParentUid(),
'simulation_state' : self.getSimulationState(),
'order_uid' : self.getOrderUid(),
'explanation_uid' : self.getExplanationUid(),
#'delivery_uid' : self.getDeliveryUid(),
'source_uid' : self.getSourceUid(),
'destination_uid' : self.getDestinationUid(),
'source_section_uid' : self.getSourceSectionUid(),
'destination_section_uid' : self.getDestinationSectionUid(),
'resource_uid' : self.getResourceUid(),
'quantity' : self.getNetConvertedQuantity(),
'start_date' : self.getStartDate(),
'stop_date' : self.getStopDate(),
'target_quantity' : self.getNetConvertedTargetQuantity(),
'target_start_date' : self.getTargetStartDate(),
'target_stop_date' : self.getTargetStopDate(),
'price' : self.getPrice(),
'total_price' : self.getTotalPrice(),
'target_total_price' : self.getTargetTotalPrice(),
'has_cell_content' : 0,
'accountable' : self.isAccountable(),
'orderable' : self.isOrderable(),
'deliverable' : self.isDeliverable(),
'variation_text' : self.getVariationText(),
'inventory' : self.getInventoriatedQuantity(),
'source_asset_price' : self.getSourceAssetPrice(),
'destination_asset_price' : self.getDestinationAssetPrice(),
} ]
for m in self.objectValues():
result.extend(m.getMovementIndex())
return result
security.declareProtected( Permissions.AccessContentsInformation,
'getExplanation')
def getExplanation(self):
......
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