Commit 9ef72d3f authored by Jérome Perrin's avatar Jérome Perrin

Disable getBaseUnitPrice feature

parent f218562f
......@@ -418,6 +418,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:
......
......@@ -242,6 +242,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