diff --git a/addons/account/models/account.py b/addons/account/models/account.py index ff6ee0bb1c7..7652895dca0 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -613,7 +613,9 @@ class AccountTax(models.Model): """ self.ensure_one() if self.amount_type == 'fixed': - return math.copysign(self.amount, base_amount) * abs(quantity) + # Use copysign to take into account the sign of the base amount which includes the sign + # of the quantity and the sign of the price_unit + return math.copysign(quantity, base_amount) * self.amount 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: