I'm working with Odoo 14 eCommerce module for shop and I'm customising email template (Sales: Order Confirmation).
I would like to show bank information which are already inserted on Accounting / Bank Accounts section of the company contact information such as; bank name, account holder name, account number etc.
I'm calling those values like this in the template:
${object.company_id.bank_ids.acc_holder_name}
${object.company_id.bank_ids.bank_name}
${object.company_id.bank_ids.acc_number}
When there is only one bank account defined, I get the right values without problem, but as soon as I add a second bank account, I get this error below:
Failed to render template : Expected singleton: res.partner.bank(2, 3)
I understand that there are id
s of bank accounts, but I don't know what is the right way to indicate the id of the bank account which I want to get the value. Any idea?