summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2020-04-30 14:36:42 +0000
committerGoffin Simon <sig@odoo.com>2020-05-04 14:56:55 +0000
commitaa0444e3de8870df5d536517e6a5f870aba2390f (patch)
tree76af7d23865d9235f9337bbdee14ea2a5eb96c6b /addons
parentc96edead36425f5fa93dfb198325cb8713c8961b (diff)
[FIX] account: Wrong tax amount with Python tax code
Steps to reproduce the bug: - Create a new tax T based on python code, leave the code how it is by default (result = price_unit * 0.10) - Check included in price - Create an invoice, add a customer, add a line with random label, assign unit price = 100 and select tax T. Bug: On the invoice, the Untaxed Amount = 90 and Taxes = -10 instead of 10 (like the behavior in 12.0) opw:2242188 closes odoo/odoo#50567 X-original-commit: c704611f7cceee516718f16610838af930709022 Signed-off-by: Laurent Smet <smetl@users.noreply.github.com> Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/account/models/account_tax.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/models/account_tax.py b/addons/account/models/account_tax.py
index 2939bbdbe6f..b56e6168dab 100644
--- a/addons/account/models/account_tax.py
+++ b/addons/account/models/account_tax.py
@@ -463,7 +463,7 @@ class AccountTax(models.Model):
incl_fixed_amount += quantity * tax.amount * sum_repartition_factor
else:
# tax.amount_type == other (python)
- tax_amount = tax._compute_amount(base, price_unit, quantity, product, partner) * sum_repartition_factor
+ tax_amount = tax._compute_amount(base, sign * price_unit, quantity, product, partner) * sum_repartition_factor
incl_fixed_amount += tax_amount
# Avoid unecessary re-computation
cached_tax_amounts[i] = tax_amount