diff options
| author | qdp-odoo <qdp@odoo.com> | 2019-09-18 15:06:26 +0000 |
|---|---|---|
| committer | qdp-odoo <qdp@odoo.com> | 2019-09-20 07:11:46 +0000 |
| commit | 5abad05e8b0ad3a03015c70a4e91a0b1daf28c10 (patch) | |
| tree | 8bf8df41b617add78f5abcc668b3e77a882e5163 | |
| parent | 4a1321bc99dd7d8d153aceb2d0076161ce28bcd7 (diff) | |
[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) <qdp@openerp.com>
| -rw-r--r-- | addons/account/models/account_move.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |
