【发布时间】:2020-03-25 07:44:52
【问题描述】:
我正在制作一份报告,可以将在一张表中创建的所有帐户合二为一。例如:我创建了“现金”、“银行”和“应付账款”的帐户,所以我选择了所有三个,它们出现在报告中。我目前正在这样做,但它仅在我选择 1 时出现,它不适用于多个。
制作此报告时显示的错误如下:
编译 AST 时出现错误 ValueError:预期的单例:proyecto_rc.account(3, 4) 模板:249 路径:/templates/t/t/t/t/div/div/thead/br/p/table/tbody/td[2]/span 节点:- - -
我在这里留下一张我想要的照片。:photo example
<report
id="list_efectcredit"
model="proyecto_rc.account"
string="Lmayor"
name="proyecto_rc.report_account_view"
file="proyecto_rc.report_lmayorefectivo"
report_type="qweb-html" />
<template id="report_account_view">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="web.external_layout">
<div class="page">
<div class="page">
<br></br>
<thead>
<center>
<h2>Ledger</h2>
</center>
<br>
<p>Detail:
<table class="customTable">
<thead>
<tr>
<th>Account</th>
<th>Debit</th>
<th>Credit</th>
</tr>
</thead>
<tbody>
<t t-set="i" t-value="1"/>
<td>
<span t-field="o.title"/>
</td>
<td>
<span t-field="o.total_account_debit"/>
</td>
<td>
<span t-field="o.total_account_credit"/>
</td>
<t t-set="i" t-value="i+1"/>
</tbody>
</table>
</p>
</br>
</thead>
</div>
</div>
</t>
</t>
</t>
</template>
【问题讨论】: