From 7e6c7392ee2abb24adab40cab2d173a21f43fda1 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 717f758ed2..8ac90f09fd 100644 --- a/purchase_request.py +++ b/purchase_request.py @@ -697,10 +697,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)]