From d0efcd85388ea075e98b6bcdf2af0f617ba38744 Mon Sep 17 00:00:00 2001 From: "Thomas (det)" Date: Wed, 9 Dec 2020 10:23:08 +0000 Subject: [PATCH] [FIX] account: Negative fixed taxes on 100% discount This commit fix a previous fix : https://github.com/odoo/odoo/pull/62244 opw-23789781~[FIX] account: Negative fixed taxes on 100% discount closes odoo/odoo#63349 X-original-commit: da6b1667ab3566a88765f38f812df6a20c0abb03 Signed-off-by: tdetry (det-odoo) Signed-off-by: Laurent Smet --- addons/account/models/account_move.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index fa7f9de0f63..8e8aad16ac7 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -3339,7 +3339,8 @@ class AccountMoveLine(models.Model): # 220 | 10% incl, 5% | | 200 | 230 # 20 | | 10% incl | 20 | 20 # 10 | | 5% | 10 | 10 - taxes_res = taxes._origin.with_context(force_sign=self.move_id._get_tax_force_sign()).compute_all(amount_currency, currency=currency, handle_price_include=False) + force_sign = -1 if move_type in ('out_invoice', 'in_refund', 'out_receipt') else 1 + taxes_res = taxes._origin.with_context(force_sign=force_sign).compute_all(amount_currency, currency=currency, handle_price_include=False) for tax_res in taxes_res['taxes']: tax = self.env['account.tax'].browse(tax_res['id']) if tax.price_include: