From 5abad05e8b0ad3a03015c70a4e91a0b1daf28c10 Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Wed, 18 Sep 2019 15:06:26 +0000 Subject: [PATCH] [FIX] account: tax audit field sign Customer invoices and supplier refunds lines involved with taxes will be credit lines, hence their balance must be inversed when shown in the tax audit field. The method is_inbound() encloses exactly those documents, whereas is_outbound() stands for customer refunds and supplier bills. closes odoo/odoo#37092 Signed-off-by: Quentin De Paoli (qdp) --- addons/account/models/account_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 0a16b75b670..3debf0e4c47 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -2776,7 +2776,7 @@ class AccountMoveLine(models.Model): currency = record.company_id.currency_id audit_str = '' for tag in record.tag_ids: - tag_amount = (tag.tax_negate and -1 or 1) * (record.move_id.is_outbound() and -1 or 1) * record.balance + tag_amount = (tag.tax_negate and -1 or 1) * (record.move_id.is_inbound() and -1 or 1) * record.balance if tag.tax_report_line_ids: #Then, the tag comes from a report line, and hence has a + or - sign (also in its name)