From a5f2ddbff0e27ca77331c645eeeb9265b8db9c8b Mon Sep 17 00:00:00 2001 From: Jean Cavallo Date: Fri, 22 Jan 2016 18:32:25 +0100 Subject: [PATCH] Do not group per party when reconciling payment lines issue5256 review19771002 --- payment.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/payment.py b/payment.py index 1f0c12399c..119eee9ae7 100644 --- a/payment.py +++ b/payment.py @@ -51,7 +51,7 @@ class Payment: cls.write(*sum((([m.origin], {'clearing_move': m.id}) for m in moves), ())) - to_reconcile = defaultdict(list) + to_reconcile = [] for payment in payments: if (payment.line and not payment.line.reconciliation @@ -59,8 +59,8 @@ class Payment: lines = [l for l in payment.clearing_move.lines if l.account == payment.line.account] + [payment.line] if not sum(l.debit - l.credit for l in lines): - to_reconcile[payment.party].extend(lines) - for lines in to_reconcile.itervalues(): + to_reconcile.append(lines) + for lines in to_reconcile: Line.reconcile(lines) def create_clearing_move(self, date=None):