Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
1153 Visninger

When Payment reference ("Other Info" tab on customer invoices) has a value (i.e. invoice number), then the bank account / bank name is printed on customer invoices

Payment Communication: 000000000000000000002500264 on this account: XX12 3456 7890 1234 5678 9 - Bank Name

field partner_bank_id has the bank account number and the bank name


For most payments, it is important to also provide the BIC. While it has been many times suggested to add bank details to the footer,  Odoo offers the option to have variable bank details added to the invoice, which is useful if you use different bank accounts (i.e. in different currencies and/or countries). 

How can I achieve to have the BIC added to the partner_bank_id field ?

Avatar
Kassér
Bedste svar

Hi,


In Odoo, the field partner_bank_id on customer invoices points to a bank account record. Each of these records contains the account number and is linked to a bank entry where details such as the bank name and BIC (SWIFT code) are stored. By default, the invoice report only prints the account number and bank name, but the BIC is already available in the system through partner_bank_id.bank_id.bic.




To include the BIC on customer invoices, you can extend the invoice report template (account.report_invoice_document). In the section where the bank account details are printed, you can add a small condition to display the BIC if it exists. This allows the invoice to show the payment reference, IBAN, bank name, and BIC together.



Sample Logic:


<t t-if="o.partner_bank_id">

    <p>

        Payment Communication: <span t-esc="o.payment_reference"/> <br/>

        On this account: <span t-esc="o.partner_bank_id.acc_number"/> -

        <span t-esc="o.partner_bank_id.bank_id.name"/>

        <t t-if="o.partner_bank_id.bank_id.bic">

            (BIC: <span t-esc="o.partner_bank_id.bank_id.bic"/>)

        </t>

    </p>

</t>


This method is better than hardcoding bank details in the footer because it supports scenarios where your company uses multiple bank accounts in different countries or currencies. By selecting the appropriate bank account on the invoice, Odoo will automatically display the correct IBAN, bank name, and BIC.



Hope it helps

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
1
okt. 25
565
5
mar. 24
4084
1
sep. 25
1711
2
feb. 24
1775
0
feb. 25
968