Reputation: 267
I 'm doing a report on the account.account model but not access the fields of account.invoice model : My view xml is as follows:
<?xml version="1.0"?>
<t t-name="account.reporte_balance">
<t t-call="report.internal_layout" style="font-size:8px;">
<t t-foreach="docs" t-as="o">
<div class="page">
<div class="oe_structure"/>
<div class="row" style="font-size:8px;">
<div class="col-xs-12">.....
To access the fields of another model that should write the following. But not getting the account.account specifically model.
**<tr t-foreach="HERE WRITE THE ACCOUNT.ACCOUNT MODEL REL" t-as="o">**
<td class="text-center">
<span t-field="o.code"/>
</td>......
I appreciate any help . Thank you very much for your time.
Upvotes: 0
Views: 89
Reputation: 1575
if invoices is a list of invoices you can do this:
<tr t-foreach="invoices" t-as="inv">**
<td class="text-center">
<span t-field="inv.account_id.name"/>
</td>
</tr>
that said, i don't understand what o. is in your code...
Upvotes: 1