我正在做一个关于帐户.帐户模型的报告,但无法访问帐户.发票模型的字段:我的观点如下:
<?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">.....
访问另一个模型的字段,应编写以下内容。但是没有获得帐户专用模型。
**<tr t-foreach="HERE WRITE THE ACCOUNT.ACCOUNT MODEL REL" t-as="o">**
<td class="text-center">
<span t-field="o.code"/>
</td>......
我感谢任何帮助.非常感谢您的时间。
如果发票是发票列表,您可以这样做:
<tr t-foreach="invoices" t-as="inv">**
<td class="text-center">
<span t-field="inv.account_id.name"/>
</td>
</tr>
也就是说,我不明白你的代码中有什么 O. ...