From 4fd8e5913a509d09caa0faed56c5070d8e2b2ab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 29 May 2012 17:24:13 +0200 Subject: [PATCH] Tax rule apply method return a list of tax ids --- purchase_request.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/purchase_request.py b/purchase_request.py index a1e754b6c9..cd7ca91cbf 100644 --- a/purchase_request.py +++ b/purchase_request.py @@ -721,10 +721,10 @@ class CreatePurchase(Wizard): for tax in request.product.supplier_taxes_used: if request.party and request.party.supplier_tax_rule: pattern = self._get_tax_rule_pattern(request) - tax_id = tax_rule_obj.apply(request.party.supplier_tax_rule, + tax_ids = tax_rule_obj.apply(request.party.supplier_tax_rule, tax, pattern) - if tax_id: - taxes.append(tax_id) + if tax_ids: + taxes.extend(tax_ids) continue taxes.append(tax.id) line['taxes'] = [('add', taxes)]