Skip to content

Commit 0ffae36

Browse files
committed
[IMP] developer/../view_architectures: list width attribute
PR odoo/odoo#232988 adds the support of minimal/maximal widths for the `width` attribute in list archs. This commit updates the documentation accordingly. task~5194492 closes #14998 Related: odoo/enterprise#98074 Signed-off-by: Aaron Bohy (aab) <[email protected]>
1 parent d5a2555 commit 0ffae36

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

content/developer/reference/user_interface/view_architectures.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,10 +1425,15 @@ The `field` element can have the following attributes:
14251425
number of pixels required to display a date, so we can ensure that a column for a date field
14261426
doesn't take more space than what is strictly necessary, thus leaving the extra space for the
14271427
other columns. However, the framework can't guess the adequate width for every field types. For
1428-
instance, char fields can be used to encode large values, or 3-letter country codes. In the
1429-
latter case, one can set the width directly in the arch (e.g. `width="40px"`). It represents
1430-
the width (always in pixels) required to render the values inside the cells. The width of the
1431-
column will then be the sum of the given value and the cells' left and right paddings.
1428+
instance, char fields can be used to encode large values, or 3-letter country codes.
1429+
1430+
The `width` attribute can be used to specify the ideal width for a given column. It allows to
1431+
specify a fixed width (e.g. `width="40px"`), a minimal width (e.g. `width="[40px]"`) or minimal
1432+
and maximal widths (e.g. `width="[40px,70px]"`). Those widths represent the space required to
1433+
render the values inside the cells. The width of the column will then be the sum of the given
1434+
value and the cells' left and right paddings.
1435+
1436+
Note: those widths are always in pixels, so "px" can be omitted (e.g. `width="30"`).
14321437

14331438
:requirement: Optional
14341439
:type: str

0 commit comments

Comments
 (0)