Commit 0cd2ff3f authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

support the case where both base_application and base_contribution are empty,...

support the case where both base_application and base_contribution are empty, that happens for using Trade Model Line as a base class of Payment Condition.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33311 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 82b7662b
......@@ -308,8 +308,10 @@ class TradeModelLine(Predicate, XMLMatrix, Amount):
# movements (current_aggregated_amount_list).
# if the quantity is not defined, take it by searching all movements
# that used this base_amount
if set(base_application_list)\
.intersection(set(movement.getBaseContributionList())) and \
if (len(base_application_list) == 0 or \
len(movement.getBaseContributionList()) == 0 or \
set(base_application_list).intersection( \
set(movement.getBaseContributionList()))) and \
(len(movement.getVariationCategoryList()) == 0 or \
len(tmp_movement.getVariationCategoryList()) == 0 or \
set(movement.getVariationCategoryList()).intersection( \
......
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