changeset 952f6e24899d in modules/account_payment_sepa:5.0
details:
https://hg.tryton.org/modules/account_payment_sepa?cmd=changeset;node=952f6e24899d
description:
Use getattr to read move origin's rec_name
Since changeset b8d76b07910f, the reference value of a negative id is a
string
so access it's rec_name crashes.
issue9773
review310971002
(grafted from 792b864de94d8e5af121bfceb47441255c0ce866)
diffstat:
payment.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 2b3689d6d85e -r 952f6e24899d payment.py
--- a/payment.py Mon Mar 09 18:36:46 2020 +0100
+++ b/payment.py Thu Oct 29 18:26:48 2020 +0100
@@ -305,7 +305,7 @@
if self.description:
return self.description
elif self.line and self.line.origin:
- return self.line.origin.rec_name
+ return getattr(self.line.origin, 'rec_name', '')
@property
def sepa_bank_account_number(self):