khelifa
khelifa

Reputation: 71

Please how to set fix size of box in form view odoo 8

How can I fix the size of a box in a form view on 0doo 8

In `XMLù group :

<field name="taxe"/>

In py file :

'taxe' : fields.selection([('17','17 %'),('12','12 %'),('10','10 %')],'Taxe Etablissement'),

enter image description here

Upvotes: 1

Views: 7145

Answers (1)

CZoellner
CZoellner

Reputation: 14768

You can use the attribute style on your xml field definition, for example:

<field name="field_x" style="width:50%%" />

or

<field name="field_y" style="width:100px" />

Percentage will use the space what was given by the parent element. So if you uses 2 columns layout (typical odoo groups) 50% will use like 25% of full width. Don't forget to escape '%'.

Upvotes: 5

Related Questions