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">&lt;format_date(move.date, 
user.language)&gt;</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">&lt;if 
test=&quot;move.origin&quot;&gt;</text:placeholder></text:p>
-        <text:p 
text:style-name="Table_20_Heading">Origin:<text:line-break/><text:placeholder 
text:placeholder-type="text">&lt;getattr(move.origin, &apos;rec_name&apos;, 
&apos;&apos;)&gt;</text:placeholder></text:p>
+        <text:p text:style-name="Table_20_Heading"><text:placeholder 
text:placeholder-type="text">&lt;if test=&quot;move.origin and 
hasattr(move.origin, 'rec_name')&quot;&gt;</text:placeholder></text:p>
+        <text:p 
text:style-name="Table_20_Heading">Origin:<text:line-break/><text:placeholder 
text:placeholder-type="text">&lt;move.origin.rec_name&gt;</text:placeholder></text:p>
         <text:p text:style-name="Table_20_Heading"><text:placeholder 
text:placeholder-type="text">&lt;/if&gt;</text:placeholder></text:p>
        </table:table-cell>
        <table:table-cell table:style-name="Table4.D1" 
table:number-columns-spanned="2" office:value-type="string">

Reply via email to