Commit e1d00bed authored by Jérome Perrin's avatar Jérome Perrin

isMovement is always callable now


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31992 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f559162f
......@@ -40,14 +40,6 @@ from Products.ERP5.PropertySheet.TradeModelLine import (TARGET_LEVEL_MOVEMENT,
TARGET_LEVEL_DELIVERY)
import zope.interface
def isMovement(document):
"""Hides isMovement method or variable complexity"""
if callable(document.isMovement):
is_movement = document.isMovement()
else:
is_movement = document.isMovement
return is_movement
class TradeModelLine(Predicate, XMLMatrix, Amount):
"""Trade Model Line is a way to represent trade transformation for movements"""
meta_type = 'ERP5 Trade Model Line'
......@@ -136,7 +128,7 @@ class TradeModelLine(Predicate, XMLMatrix, Amount):
# otherwise it is needed to look up for movements
if len(movement_list) == 0:
# no movements passed, need to find some
if isMovement(context):
if context.isMovement():
# create movement lists from context
movement_list = [context]
else:
......
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