Add Payment order template

This commit is contained in:
2026-04-07 14:15:10 +02:00
parent 78e9e06a8b
commit eaa5c8b544
2 changed files with 17 additions and 9 deletions

View File

@@ -1667,7 +1667,8 @@
<text:p text:style-name="P10" loext:marker-style-name="T20"><text:span text:style-name="T11">From:</text:span><text:span text:style-name="T11"/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau2.A1" office:value-type="string">
<text:p text:style-name="P11" loext:marker-style-name="T15"><text:span text:style-name="T15">Account Number : <text:placeholder text:placeholder-type="text">&lt;records[0].report_payment_order_from_account_nb or &apos;&apos;&gt;</text:placeholder></text:span><text:span text:style-name="T15"/></text:p>
<text:p text:style-name="P11" loext:marker-style-name="T15"><text:span text:style-name="T15"><text:placeholder text:placeholder-type="text">&lt;records[0].report_payment_order_short_name or &apos;&apos;&gt;</text:placeholder></text:span><text:span text:style-name="T15"/></text:p>
<text:p text:style-name="P11" loext:marker-style-name="T15"><text:span text:style-name="T15">Account Number: <text:placeholder text:placeholder-type="text">&lt;records[0].report_payment_order_from_account_nb or &apos;&apos;&gt;</text:placeholder></text:span><text:span text:style-name="T15"/></text:p>
<text:p text:style-name="P17" loext:marker-style-name="T15"/>
</table:table-cell>
</table:table-row>
@@ -1695,7 +1696,7 @@
<text:p text:style-name="P7" loext:marker-style-name="T20"><text:span text:style-name="T9">Amount:</text:span><text:span text:style-name="T9"/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau3.A1" office:value-type="string">
<text:p text:style-name="P7" loext:marker-style-name="T21"><text:span text:style-name="T17"><text:placeholder text:placeholder-type="text">&lt;records[0].report_payment_order_amount or &apos;&apos;&gt;</text:placeholder></text:span><text:span text:style-name="T16"><text:placeholder text:placeholder-type="text">&lt;records[0].report_payment_order_currency_code or &apos;&apos;&gt;</text:placeholder> <text:placeholder text:placeholder-type="text">&lt;records[0].report_payment_order_amount or &apos;&apos;&gt;</text:placeholder></text:span><text:span text:style-name="T17"></text:span><text:span text:style-name="T16"> (<text:placeholder text:placeholder-type="text">&lt;records[0].report_payment_order_currency_code or &apos;&apos;&gt;</text:placeholder> <text:placeholder text:placeholder-type="text">&lt;records[0].report_payment_order_amount or &apos;&apos;&gt;</text:placeholder>)</text:span><text:span text:style-name="T17"></text:span></text:p>
<text:p text:style-name="P7" loext:marker-style-name="T21"><text:span text:style-name="T16"><text:placeholder text:placeholder-type="text">&lt;records[0].report_payment_order_currency_code or &apos;&apos;&gt;</text:placeholder> <text:placeholder text:placeholder-type="text">&lt;records[0].report_payment_order_amount or &apos;&apos;&gt;</text:placeholder></text:span></text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="Tableau3.1">
@@ -1703,7 +1704,7 @@
<text:p text:style-name="P15" loext:marker-style-name="T9"/>
</table:table-cell>
<table:table-cell table:style-name="Tableau3.A1" office:value-type="string">
<text:p text:style-name="P11" loext:marker-style-name="T20"><text:span text:style-name="T9">(<text:placeholder text:placeholder-type="text">&lt;records[0].report_payment_order_currency_code or &apos;&apos;&gt;</text:placeholder> <text:placeholder text:placeholder-type="text">&lt;records[0].report_payment_order_amount_text or &apos;&apos;&gt;</text:placeholder>)</text:span><text:span text:style-name="T9"/></text:p>
<text:p text:style-name="P11" loext:marker-style-name="T20"><text:span text:style-name="T9">(<text:placeholder text:placeholder-type="text">&lt;records[0].report_payment_order_amount_text or &apos;&apos;&gt;</text:placeholder>)</text:span><text:span text:style-name="T9"/></text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="Tableau3.1">
@@ -1735,7 +1736,9 @@
<text:p text:style-name="P11" loext:marker-style-name="T20"><text:span text:style-name="T9">Beneficiary:</text:span><text:span text:style-name="T9"/></text:p>
</table:table-cell>
<table:table-cell table:style-name="Tableau3.A1" office:value-type="string">
<text:p text:style-name="P11" loext:marker-style-name="T20"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text">&lt;records[0].report_payment_order_company_address or &apos;&apos;&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
<text:p text:style-name="P11"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;line in (records[0].report_payment_order_company_address or &apos;&apos;).split(&apos;\n&apos;)&quot;&gt;</text:placeholder></text:p>
<text:p text:style-name="P11" loext:marker-style-name="T20"><text:span text:style-name="T9"><text:placeholder text:placeholder-type="text">&lt;line&gt;</text:placeholder></text:span><text:span text:style-name="T9"/></text:p>
<text:p text:style-name="P11"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p>
</table:table-cell>
</table:table-row>
<table:table-row table:style-name="Tableau3.1">

View File

@@ -227,11 +227,16 @@ class Invoice(metaclass=PoolMeta):
@property
def report_payment_order_currency_code(self):
currency = self.currency
return (
getattr(currency, 'code', None)
or getattr(currency, 'rec_name', None)
or getattr(currency, 'symbol', None)
or '')
code = getattr(currency, 'code', None) or ''
rec_name = getattr(currency, 'rec_name', None) or ''
symbol = getattr(currency, 'symbol', None) or ''
if code and any(ch.isalpha() for ch in code):
return code
if rec_name and any(ch.isalpha() for ch in rec_name):
return rec_name
if symbol and any(ch.isalpha() for ch in symbol):
return symbol
return code or rec_name or symbol or ''
@property
def report_payment_order_amount_text(self):