[IMP] models: move prefetching of records back to method _prefetch_field
[odoo/odoo.git] / doc / 06_misc_list_font_style.rst
1 Font style in list views
2 ========================
3
4 .. versionadded:: 7.0
5
6 This revision adds font styles in list views. Before this revision it was
7 possible to define some colors in list view. This revision allows to define 
8 the a font style, based on an evaluated Python expression. The definition syntax is 
9 the same than the colors feature. Supported styles are bold, italic and 
10 underline.
11
12 Rng modification
13 +++++++++++++++++
14
15 This revision adds the ``fonts`` optional attribute in ``view.rng``.
16
17 Addon implementation example
18 ++++++++++++++++++++++++++++
19
20 In your ``foo`` module, you want to specify that when any record is in ``pending`` 
21 state then it should be displayed in bold in the list view. Edit your foo_view.xml
22 file that define the views, and add the fonts attribute to the tree tag.
23
24 .. code-block:: xml
25
26   <tree string="Foo List View" fonts="bold:state=='pending'">
27     [...]
28   </tree>