[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
This commit is contained in:
Denis Ledoux 2014-02-05 11:03:24 +01:00
parent 14631ed6c5
commit 34beebac6c
1 changed files with 1 additions and 1 deletions

View File

@ -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)