From fbca56111be85f7c6f8b5a9cef43d143d69449fe Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 14 Jul 2016 16:32:57 +0200 Subject: [PATCH] [FIX] account: sign of a fixed amount tax The sign of a fixed amount tax must be the same as the base amount. Inspired from the computation of a percent tax. opw:682407 --- addons/account/models/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account.py b/addons/account/models/account.py index d0aca4fafe4..ff6ee0bb1c7 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -613,7 +613,7 @@ class AccountTax(models.Model): """ self.ensure_one() if self.amount_type == 'fixed': - return math.copysign(self.amount, base_amount) * quantity + return math.copysign(self.amount, base_amount) * abs(quantity) if (self.amount_type == 'percent' and not self.price_include) or (self.amount_type == 'division' and self.price_include): return base_amount * self.amount / 100 if self.amount_type == 'percent' and self.price_include: