Commit 53402cd4 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Revert "amount_generator: getBaseAmountQuantity method can differ per amount generator line."

This reverts commit 6430ccc3.

because it's redundant with the fact that we can already distinguish different Trade Model Line within the returned function by using .getAmountGeneratorLine() on the first parameter.
parent 37e7ef32
Pipeline #12952 failed with stage
in 0 seconds
...@@ -150,17 +150,16 @@ class BaseAmountDict(Implicit): ...@@ -150,17 +150,16 @@ class BaseAmountDict(Implicit):
return value return value
def _getGeneratedAmountQuantity(self, base_amount, variation_category_list): def _getGeneratedAmountQuantity(self, base_amount, variation_category_list):
amount_generator_line = self.aq_base._amount_generator_line
try: try:
method = self._cache[(amount_generator_line, base_amount)] method = self._cache[base_amount]
except KeyError: except KeyError:
method = amount_generator_line._getTypeBasedMethod( method = self.aq_base._amount_generator_line._getTypeBasedMethod(
'getBaseAmountQuantityMethod') 'getBaseAmountQuantityMethod')
if method is not None: if method is not None:
method = method(base_amount) method = method(base_amount)
if method is None: if method is None:
method = amount_generator_line.getBaseAmountQuantity method = self.aq_base._amount_generator_line.getBaseAmountQuantity
self._cache[(amount_generator_line, base_amount)] = method self._cache[base_amount] = method
if variation_category_list: if variation_category_list:
kw = dict(self._method_kw, kw = dict(self._method_kw,
variation_category_list=variation_category_list) variation_category_list=variation_category_list)
......
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