Attrs Div Tag Odoo Layout Issue

Odoo Attrs

Probuse Admin

<label for="qty_invoiced" string="Invoiced Quantity" invisible="not context.get('show_sale')"/>

<div>

    <field name="qty_invoiced" invisible="not context.get('show_sale')"/>

</div>

Above code may create issue in layout on form.

<label for="qty_invoiced" string="Invoiced Quantity" invisible="not context.get('show_sale')"/>

<div invisible="not context.get('show_sale')">

    <field name="qty_invoiced" invisible="not context.get('show_sale')"/>

</div>

Odoo Code Hint: Always try to use attrs at Div level.