[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>
This commit is contained in:
qdp-odoo
2019-09-20 07:11:46 +00:00
parent 4a1321bc99
commit 5abad05e8b
+1 -1
View File
@@ -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)