Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show two fields on a single line with a single label in a form view?

I have two fields product_qty and product_uom, and I need to show a label for product_qty and the two fields on the same line.

I found an answer to the same question on Odoo forum but it did not exactly what I want.

<group>
    <label for="product_qty"/>
    <div class="address_format">
        <field name="product_qty"/>
        <field name="product_uom"/>
    </div>
</group>

Is it possible to get them inlined on the same line?

like image 438
Kenly Avatar asked Oct 24 '25 10:10

Kenly


1 Answers

Try this:

<group>
    <label for="product_qty"/>
    <div>
        <field name="product_qty" class="oe_inline"/>
        <field name="product_uom" class="oe_inline"/>
    </div>
</group>
like image 99
forvas Avatar answered Oct 26 '25 08:10

forvas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!