【发布时间】:2018-04-15 23:19:23
【问题描述】:
> WARNING 11_test1 odoo.addons.base.ir.ir_ui_view: Error-prone use of
> @class in view report_invoice_document
> (account_invoice_report.report_invoice_document): use the
> hasclass(*classes) function to filter elements by their classes
谁能解释我为什么会收到此警告。仅在 2 个地方使用课程。
<td class="text-right">
<span t-esc="', '.join(map(lambda x: (x.description or x.name), l.invoice_line_tax_ids))"/>
</td>
和
<xpath expr="//div[@class='row mt32 mb32']/div[@t-if='o.name']" position="replace"/>
【问题讨论】:
-
尝试使用位置属性,例如
<xpath expr="/div/div[2]/div[@t-if='o.name']" position="replace"/>
标签: openerp odoo-8 odoo-9 odoo-10