Commit e9c7b8c4 authored by Jérome Perrin's avatar Jérome Perrin

base: honor getPreferredTaxUseList instead of hardcoding a use

parent 5ce4265c
......@@ -94,7 +94,7 @@ def getTaxLineList(order):
order.contentValues(portal_type=order.getPortalTaxMovementTypeList())
if line.getTotalPrice()]
for line in order.Base_getSpecialisedAggregatedAmountList():
if line.getTradePhase() == "trade/tax":
if any(line.isMemberOf(tax_use) for tax_use in tax_use_list):
tax_line_list.append(line)
tax_line_list.sort(key=lambda line:line.getTitle())
return tax_line_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