From d31b1ab2a709dddc61a206fecc91c1e3081885e3 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Wed, 25 Nov 2015 11:02:11 +0100 Subject: [PATCH] [FIX] account: amount_residual_signed should be negative for refunds only --- addons/account/models/account_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index 6163bdbfc90..6e64860f700 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -84,7 +84,7 @@ class AccountInvoice(models.Model): def _compute_residual(self): residual = 0.0 residual_company_signed = 0.0 - sign = self.type in ['in_refund', 'in_invoice'] and -1 or 1 + sign = self.type in ['in_refund', 'out_refund'] and -1 or 1 for line in self.sudo().move_id.line_ids: if line.account_id.internal_type in ('receivable', 'payable'): residual_company_signed += line.amount_residual * sign