=== modified file 'account/account_invoice.py' --- account/account_invoice.py 2011-11-10 22:58:02 +0000 +++ account/account_invoice.py 2011-11-12 05:19:15 +0000 @@ -132,18 +132,17 @@ def _compute_lines(self, cr, uid, ids, name, args, context=None): result = {} for invoice in self.browse(cr, uid, ids, context=context): + moves = self.move_line_id_payment_get(cr, uid, [invoice.id]) src = [] lines = [] - if invoice.move_id: - for m in invoice.move_id.line_id: - temp_lines = [] - if m.reconcile_id: - temp_lines = map(lambda x: x.id, m.reconcile_id.line_id) - elif m.reconcile_partial_id: - temp_lines = map(lambda x: x.id, m.reconcile_partial_id.line_partial_ids) - lines += [x for x in temp_lines if x not in lines] - src.append(m.id) - + for m in self.pool.get('account.move.line').browse(cr, uid, moves, context): + temp_lines = [] + if m.reconcile_id: + temp_lines = map(lambda x: x.id, m.reconcile_id.line_id) + elif m.reconcile_partial_id: + temp_lines = map(lambda x: x.id, m.reconcile_partial_id.line_partial_ids) + lines += [x for x in temp_lines if x not in lines] + src.append(m.id) lines = filter(lambda x: x not in src, lines) result[invoice.id] = lines return result