From 34beebac6cddba36a87ffc48a03e167e6f0c4983 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 5 Feb 2014 11:03:24 +0100 Subject: [PATCH] [FIX] account: residual amount computation with refund invoices On invoice residual amount computing, we ignore reconcile entries line if their invoice are not of the same type of the current invoice The above revision(s) will be removed bzr revid: dle@openerp.com-20140205100324-5tyquozmylcp40p1 --- addons/account/account_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 5284b1e5322..55ba1058d58 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -117,7 +117,7 @@ class account_invoice(osv.osv): #we check if the invoice is partially reconciled and if there are other invoices #involved in this partial reconciliation (and we sum these invoices) for line in aml.reconcile_partial_id.line_partial_ids: - if line.invoice: + if line.invoice and invoice.type == line.invoice.type: nb_inv_in_partial_rec += 1 #store the max invoice id as for this invoice we will make a balance instead of a simple division max_invoice_id = max(max_invoice_id, line.invoice.id)