Commit 1521d7b4 authored by Romain Courteaud's avatar Romain Courteaud

Reject the amount generator sooner

git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@34673 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ac233132
...@@ -165,6 +165,8 @@ class AmountGeneratorMixin: ...@@ -165,6 +165,8 @@ class AmountGeneratorMixin:
for amount_generator_line in amount_generator_line_list: for amount_generator_line in amount_generator_line_list:
accumulateAmountList(amount_generator_line) accumulateAmountList(amount_generator_line)
return return
elif (self.getPortalType() not in amount_generator_line_type_list):
return
# Try to collect cells and aggregate their mapped properties # Try to collect cells and aggregate their mapped properties
# using resource + variation as aggregation key or base_application # using resource + variation as aggregation key or base_application
# for intermediate lines # for intermediate lines
...@@ -173,11 +175,7 @@ class AmountGeneratorMixin: ...@@ -173,11 +175,7 @@ class AmountGeneratorMixin:
resource_amount_aggregate = {} # aggregates final line information resource_amount_aggregate = {} # aggregates final line information
value_amount_aggregate = {} # aggregates intermediate line information value_amount_aggregate = {} # aggregates intermediate line information
if (not amount_generator_cell_list) and (self.getPortalType() in for amount_generator_cell in amount_generator_cell_list or (self,):
amount_generator_line_type_list):
amount_generator_cell_list = (self,)
for amount_generator_cell in amount_generator_cell_list:
if not amount_generator_cell.test(delivery_amount): if not amount_generator_cell.test(delivery_amount):
continue continue
base_application_list = amount_generator_cell.getBaseApplicationList() base_application_list = amount_generator_cell.getBaseApplicationList()
......
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