changeset 59a9b1276757 in modules/account_payment_clearing:5.0
details:
https://hg.tryton.org/modules/account_payment_clearing?cmd=changeset;node=59a9b1276757
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 bd2fe7a455fe -r 59a9b1276757 statement.py
--- a/statement.py Wed Jul 17 21:24:17 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):