changeset d15f39896d36 in modules/account_payment_sepa:5.4
details: 
https://hg.tryton.org/modules/account_payment_sepa?cmd=changeset;node=d15f39896d36
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 000b43adb343 -r d15f39896d36 payment.py
--- a/payment.py        Mon Mar 09 18:36:05 2020 +0100
+++ b/payment.py        Thu Oct 29 18:26:48 2020 +0100
@@ -337,7 +337,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):

Reply via email to