From 3976fb080f149fc57ef0a52f14a7b0487a903e9e 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 (transplanted from 228576b60e223e126580b46020fa913e7b01a6c8) --- purchase_request.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/purchase_request.py b/purchase_request.py index e54cad996a..a91f83b367 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)]