From 82588faa71e8da27d886ce8402841dc4985b95ff Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Tue, 28 Oct 2014 13:30:26 +0100 Subject: [PATCH] [FIX] account: tax mapping logic was broken by 7508b7c The original tax should not be applied if at least one destination tax was applied. It should only be applied if explicitly included in target taxes. (Re-)Fixes #2261 --- addons/account/partner.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/account/partner.py b/addons/account/partner.py index fa6dd0eb8ce..74fbbe17853 100644 --- a/addons/account/partner.py +++ b/addons/account/partner.py @@ -79,11 +79,13 @@ class account_fiscal_position(osv.osv): def map_tax(self, taxes): result = self.env['account.tax'].browse() for tax in taxes: + tax_count = 0 for t in self.tax_ids: if t.tax_src_id == tax: if t.tax_dest_id: + tax_count += 1 result |= t.tax_dest_id - else: + if not tax_count: result |= tax return result