From 5e69a0c89920c2b7824e7ab4c1907ad7ba72d7d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Tue, 15 Mar 2011 09:03:45 +0000 Subject: [PATCH] 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 --- product/ERP5/Document/ImmobilisableItem.py | 38 ++++++++++++---------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/product/ERP5/Document/ImmobilisableItem.py b/product/ERP5/Document/ImmobilisableItem.py index 34ca5ce9be..75d91efe93 100644 --- a/product/ERP5/Document/ImmobilisableItem.py +++ b/product/ERP5/Document/ImmobilisableItem.py @@ -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') -- 2.30.9