I want to add a bank address to a customer invoice. Other fields are ok, but the address is empty.
Any help is appreciate.
<template id="report_invoice_document_inherit" inherit_id="account.report_invoice_document">
<xpath expr="//p[@t-if='o.fiscal_position_id.note']" position="after">
<t t-foreach="o.company_id.bank_journal_ids" t-as="journal">
<t t-set="bank_acc" t-value="journal.bank_account_id"/>
<t t-if="journal.display_on_footer">
<div style="witdth: 35%; border-bottom: 1px solid black;" name="bank_address">
<br/>Bank: <span t-esc="bank_acc.bank_name"/>
<br/>Currency: <span t-esc="bank_acc.currency_id.name"/>
<br/>Account number: <span t-esc="bank_acc.acc_number"/>
<br/><span t-esc="bank_acc.bank_name"/>
<address t-field="bank_acc.bank_id"
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'/>
<br/><t t-if="bank_acc.bank_bic"><span t-esc="bank_acc.bank_bic"/></t>
</div>
</t>
</t>
</xpath>
</template>
what is the model of bank_id field ? if you do <t t-esc=''bank_acc.bank_id"/> ...
In which version ?
bank_acc - res.partner.bank and bank_acc.bank_id - res.bank
I can see it it invoice if do <span t-esc="bank_acc.bank_id">
Odoo 9.0
What's the output of : <t-esc="bank_acc.bank_id.sudo().with_context(show_address=True).name_get()[0][1]"/>
note sure that widget contact work for other object than res_partner out of the box...