changeset 389836e884bd in modules/sale_payment:5.0
details:
https://hg.tryton.org/modules/sale_payment?cmd=changeset&node=389836e884bd
description:
Prevent error when payment has no account attribute
issue11780
review433581003
(grafted from 3d6541cd565795727707e19ca9e182b4537b22cb)
diffstat:
account.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r f1e1511bba94 -r 389836e884bd account.py
--- a/account.py Tue Feb 01 18:27:16 2022 +0100
+++ b/account.py Thu Oct 13 08:12:05 2022 +0200
@@ -118,7 +118,7 @@
continue
if payment.party != line.party:
continue
- if (getattr(payment, 'account')
+ if (getattr(payment, 'account', None)
and payment.account != line.account):
continue
if payment.amount <= payment_amount: