Prevent error when payment has no account attribute

issue11780
review433581003
This commit is contained in:
Sergi Almacellas Abellana
2022-10-13 08:12:05 +02:00
parent 141e0ae6e8
commit f3328bcfc3
+1 -1
View File
@@ -123,7 +123,7 @@ class Invoice(metaclass=PoolMeta):
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: