> 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
Can someone explain me why i'm getting this warning. using class only in 2 places.
<td class="text-right">
<span t-esc="', '.join(map(lambda x: (x.description or x.name), l.invoice_line_tax_ids))"/>
</td>
and
<xpath expr="//div[@class='row mt32 mb32']/div[@t-if='o.name']" position="replace"/>
You can use hasclass() now. Example-
xpath expr="//div[hasclass('dropdown')]" position="replace">
xpath expr="//div[hasclass('dropdown','btn-group','dropdown_sorty_by')]" position="replace">
In your case it should be:
<xpath expr="//div[hasclass('row','mt32','mb32')]/div[@t-if='o.name']" position="replace"/>