changeset 792b864de94d in modules/account_payment_sepa:default
details:
https://hg.tryton.org/modules/account_payment_sepa?cmd=changeset;node=792b864de94d
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
diffstat:
payment.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 9a05bbacc058 -r 792b864de94d payment.py
--- a/payment.py Tue Oct 27 21:12:51 2020 +0100
+++ b/payment.py Thu Oct 29 18:26:48 2020 +0100
@@ -367,7 +367,7 @@
if self.description:
return self.description
elif self.line and self.line.move_origin:
- return self.line.move_origin.rec_name
+ return getattr(self.line.move_origin, 'rec_name', '')
@property
def sepa_bank_account_number(self):