Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
1042 Vizualizări

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 ?

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Cel mai bun răspuns

Adding the BIC to customer invoices requires customization beyond standard Odoo functionality.



  The partner_bank_id field currently doesn't include the BIC. To add it, you'll need to modify the invoice report template.

  This involves extending the report template (likely using QWeb) to fetch the BIC from the res.partner.bank model and include it in the invoice's layout. You might need to add a new field to the res.partner.bank model if it doesn't already exist to store the BIC.

  Alternatively, a custom module could be developed to achieve this, ensuring clean separation of your changes from core Odoo functionality. This approach is generally recommended for maintainability and easier upgrades.


For personalized assistance:
https://www.pragtech.co.in/contact.html

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
sept. 25
401
5
mar. 24
3970
1
sept. 25
1625
2
feb. 24
1660
0
feb. 25
862