Commit ff4cfa91 authored by Jean-Paul Smets's avatar Jean-Paul Smets Committed by Xiaowu Zhang

Added a comment to explain why there is a mixup of kw arguments in getPrice API

parent c803a430
...@@ -264,12 +264,12 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin): ...@@ -264,12 +264,12 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
# the good-old-days way (which only returns a final result). # the good-old-days way (which only returns a final result).
if context is None: if context is None:
context = self context = self
method = context._getTypeBasedMethod('getPriceCalculationOperandDict') method = context._getTypeBasedMethod('getPriceCalculationOperandDict') # Why on the context ???? nonsense ZAWEE
if method is None: if method is None:
# Try this, because when the context is an instance of a derived # Try this, because when the context is an instance of a derived
# class of Movement, Movement_getPriceCalculationOperandDict is # class of Movement, Movement_getPriceCalculationOperandDict is
# not searched. # not searched.
method = getattr(context, 'Movement_getPriceCalculationOperandDict', None) method = getattr(context, 'Movement_getPriceCalculationOperandDict', None) # XXX-JPS should be getTypedBased on self ZAWEE
if method is not None: if method is not None:
operand_dict = method(**kw) operand_dict = method(**kw)
if operand_dict is None: if operand_dict is None:
......
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