details: https://code.tryton.org/tryton/commit/7e1c7cb2a0f2
branch: default
user: Cédric Krier <[email protected]>
date: Fri Jul 03 13:37:38 2026 +0200
description:
Replace getattr by hasattr in general journal report
Closes #14929
diffstat:
modules/account/general_journal.fodt | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (14 lines):
diff -r 0aea18c5ecbb -r 7e1c7cb2a0f2 modules/account/general_journal.fodt
--- a/modules/account/general_journal.fodt Thu Jul 02 22:59:30 2026 +0200
+++ b/modules/account/general_journal.fodt Fri Jul 03 13:37:38 2026 +0200
@@ -521,8 +521,8 @@
<text:p text:style-name="Table_20_Heading">Date:<text:line-break/>
<text:placeholder text:placeholder-type="text"><format_date(move.date,
user.language)></text:placeholder></text:p>
</table:table-cell>
<table:table-cell table:style-name="Table4.C1"
office:value-type="string">
- <text:p text:style-name="Table_20_Heading"><text:placeholder
text:placeholder-type="text"><if
test="move.origin"></text:placeholder></text:p>
- <text:p
text:style-name="Table_20_Heading">Origin:<text:line-break/><text:placeholder
text:placeholder-type="text"><getattr(move.origin, 'rec_name',
'')></text:placeholder></text:p>
+ <text:p text:style-name="Table_20_Heading"><text:placeholder
text:placeholder-type="text"><if test="move.origin and
hasattr(move.origin, 'rec_name')"></text:placeholder></text:p>
+ <text:p
text:style-name="Table_20_Heading">Origin:<text:line-break/><text:placeholder
text:placeholder-type="text"><move.origin.rec_name></text:placeholder></text:p>
<text:p text:style-name="Table_20_Heading"><text:placeholder
text:placeholder-type="text"></if></text:placeholder></text:p>
</table:table-cell>
<table:table-cell table:style-name="Table4.D1"
table:number-columns-spanned="2" office:value-type="string">