changeset 8e81d42e2b4b in modules/account_payment_clearing:5.2
details: 
https://hg.tryton.org/modules/account_payment_clearing?cmd=changeset;node=8e81d42e2b4b
description:
        Group line per payment only if they have the attribute

        The line can be a statement line or an origin which does not have a 
payment
        field.

        issue8606
        review274001008
        (grafted from e33e9acd6b620b9bd3987aeb17d56c501bf78f21)
diffstat:

 statement.py |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r 5ac4c2d3b138 -r 8e81d42e2b4b statement.py
--- a/statement.py      Wed Jul 17 21:23:59 2019 +0200
+++ b/statement.py      Sat Sep 28 23:17:31 2019 +0200
@@ -59,7 +59,9 @@
 
     def _group_key(self, line):
         key = super(Statement, self)._group_key(line)
-        return key + (('payment', line.payment),)
+        if hasattr(line, 'payment'):
+            key += (('payment', line.payment),)
+        return key
 
 
 class StatementLine(metaclass=PoolMeta):

Reply via email to