Files
Odoo-Build/snippets/account_batch_payment.print_batch_payment.sort.xml
T
2025-05-12 19:20:10 +02:00

22 lines
878 B
XML

<data inherit_id="account_batch_payment.print_batch_payment" priority="50">
<xpath expr=" //tr[@t-as='payment']" position="replace">
<t t-set="sorted_payments" t-value="sorted(o.payment_ids, key=lambda p: (p.partner_id.name or ''))"/>
<tr t-foreach="sorted_payments" t-as="payment">
<td class="text-start">
<t t-esc="payment.partner_id.name"/>
</td>
<td class="text-start">
<t t-esc="payment.date" t-options="{&quot;widget&quot;: &quot;date&quot;}"/>
</td>
<td class="text-start">
<t t-esc="payment.ref"/>
</td>
<td class="text-end">
<t t-esc="payment.amount" t-options="{'widget': 'monetary', 'display_currency': payment.currency_id}"/>
</td>
</tr>
</xpath>
</data>