Commit 986d734a authored by Jérome Perrin's avatar Jérome Perrin

Disable getBaseUnitPrice feature

parent c381b8a9
......@@ -410,6 +410,7 @@ class Amount(Base, VariatedMixin):
# Stop any recursive call to this method. This happens when a Path
# does not have base unit price locally, so it looks it up, and
# each path of a predicate list does the same again.
return 0.01 # feature disabled
tv = getTransactionalVariable()
key = '_getBaseUnitPrice'
if key in tv:
......
......@@ -258,6 +258,7 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
def _getBaseUnitPrice(self, context):
# Override Amount._getBaseUnitPrice to use Movement's
# getPriceCalculationOperandDict instead of Resource's.
return 0.01 # feature disabled
operand_dict = context.getPriceCalculationOperandDict(context=context)
if operand_dict is not None:
base_unit_price = operand_dict.get('base_unit_price', 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