[IMP] l10n_au: Remittance Advice

In AU, it is customary to name proof of payments document
with different headers if the partner is a customer or a
supplier.

If the partner is a customer, the current "Payment Receipt"
is expected.
If the partner is a supplier, "Remittance Advice" is expected.

This change will bring this to the payment receipt report
if:
- the australian localisation is installed
- either the company or the partner are from Australia

Task id # 3465257

closes odoo/odoo#139543

Signed-off-by: Laurent Smet (las) <las@odoo.com>
This commit is contained in:
Nicolas Viseur (vin)
2023-10-26 08:45:57 +00:00
parent 33e00d1c13
commit 5dc625fada
3 changed files with 16 additions and 1 deletions
@@ -5,7 +5,7 @@
<t t-set="o" t-value="o.with_context(lang=lang)"/>
<t t-set="values" t-value="o._get_payment_receipt_report_values()"/>
<div class="page">
<h3><strong>Payment Receipt: <span t-field="o.name"/></strong></h3>
<h3><strong id="payment_title">Payment Receipt: <span t-field="o.name"/></strong></h3>
<div class="mb-4 mt-3">
<div name="date" class="row">
<div class="col-6" t-if="o.date">
+1
View File
@@ -26,6 +26,7 @@ Also:
'views/report_invoice.xml',
'views/res_company_views.xml',
'views/res_partner_bank_views.xml',
'views/report_payment_receipt_templates.xml',
],
'demo': [
'demo/demo_company.xml',
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="report_payment_receipt_document" inherit_id="account.report_payment_receipt_document">
<xpath expr="//strong[@id='payment_title']" position="replace">
<!-- Customary in Australia to use the term "Remittance Advice" for payments to suppliers -->
<t t-if="o.company_id.account_fiscal_country_id.code == 'AU' and o.partner_type == 'supplier'">
<strong>Remittance Advice: <span t-field="o.name"/></strong>
</t>
<t t-else="">
<strong>Payment Receipt: <span t-field="o.name"/></strong>
</t>
</xpath>
</template>
</odoo>