Commit 5e69a0c8 authored by Jérome Perrin's avatar Jérome Perrin

comment out code that claims that ImmobilisableItem implements IExpandableItem,

because they do not have 'expand' method, and because at the time beeing all
Items are subclasses of ImmobilisableItem


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44280 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2687b31e
......@@ -78,23 +78,27 @@ class ImmobilisableItem(XMLObject, Amount):
, PropertySheet.Amortisation
)
zope.interface.implements(interfaces.IExpandableItem,)
# IExpandableItem interface implementation
def getSimulationMovementSimulationState(self, simulation_movement):
"""Returns the simulation state for this simulation movement.
"""
portal = self.getPortalObject()
draft_state_list = portal.getDraftOrderStateList()
# if we have an order which is not draft, we'll consider the generated
# simulation movement are planned.
# This is probably oversimplified implementation, as we may want to look
# deliveries / invoices.
for movement in self.getAggregateRelatedValueList(
portal_type=portal.getPortalOrderMovementTypeList(),):
if movement.getSimulationState() not in draft_state_list:
return 'planned'
return 'draft'
# FIXME: ImmobilisableItem have to implement IExpandableItem, but they do
# not have 'expand' method at the time beeing, simulation methods used here
# have different names.
## zope.interface.implements(interfaces.IExpandableItem,)
##
## # IExpandableItem interface implementation
## def getSimulationMovementSimulationState(self, simulation_movement):
## """Returns the simulation state for this simulation movement.
## """
## portal = self.getPortalObject()
## draft_state_list = portal.getDraftOrderStateList()
## # if we have an order which is not draft, we'll consider the generated
## # simulation movement are planned.
## # This is probably oversimplified implementation, as we may want to look
## # deliveries / invoices.
## for movement in self.getAggregateRelatedValueList(
## portal_type=portal.getPortalOrderMovementTypeList(),):
## if movement.getSimulationState() not in draft_state_list:
## return 'planned'
## return 'draft'
security.declareProtected(Permissions.AccessContentsInformation,
'getImmobilisationRelatedMovementList')
......
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