Skip to Content
Menu
This question has been flagged
2 Replies
32014 Views

How I can change the size and position of the fields in a form? Thanks.

Avatar
Discard
Best Answer

<field name="your_field" style="width:16%" />

Avatar
Discard
Best Answer

Hi Toni,

move fields : You can create an inherited view that removes former fields and then add modified fields to the new position

resize fields : You may use width attribute of the fields to set size.

e.g. : <record model="ir.ui.view" id="some_inherited_view"> <field name="name">some.inherited.view</field> <field name="type">form</field> <field name="model">some.model.with.one2many</field> <field name="inherit_id" ref="core_module.some_view"/> <field name="arch" type="xml"> <data> <xpath expr="//field[@name='myfield']" position="replace"/>

        <xpath
           expr="//field[@name='fieldbefore']"
           position="after">
           <field name="myfield" width="200"/>
        </xpath>

    </data>

</field>

Avatar
Discard