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