Commit 0fccc15b authored by Jérome Perrin's avatar Jérome Perrin

test movement using interface


git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@37541 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f27116c3
......@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.CMFActivity.ActiveProcess import ActiveProcess
from Products.ERP5.interfaces.movement import IMovement
class SolverProcess(XMLObject, ActiveProcess):
"""
......@@ -216,11 +217,12 @@ class SolverProcess(XMLObject, ActiveProcess):
if not isinstance(delivery_or_movement, (tuple, list)):
delivery_or_movement = [delivery_or_movement]
movement_list = []
isMovement = IMovement.providedBy
for x in delivery_or_movement:
if x.isDelivery():
movement_list.extend(x.getMovementList())
else:
if isMovement(x):
movement_list.append(x)
else:
movement_list.extend(x.getMovementList())
# We suppose here that movement_list is a list of
# delivery movements. Let us group decisions in such way
......
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