[MERGE] Merged server-side branch of feature allowing to use 'fonts="bold:expression"' in list views. This comes with a web branch effectively implementing this behavior, and an addon branch using this feature with the need_action mechanism.

bzr revid: tde@openerp.com-20120419095730-e3ty2upzbdfv0gwk
This commit is contained in:
Thibault Delavallée 2012-04-19 11:57:30 +02:00
commit cc7726a25f
3 changed files with 30 additions and 0 deletions

28
doc/api/font_style.rst Normal file
View File

@ -0,0 +1,28 @@
Font style in list views
========================
.. versionadded:: 7.0
This revision adds font styles in list views. Before this revision it was
possible to define some colors in list view. This revision allows to define
the a font style, based on an evaluated Python expression. The definition syntax is
the same than the colors feature. Supported styles are bold, italic and
underline.
Rng modification
+++++++++++++++++
This revision adds the ``fonts`` optional attribute in ``view.rng``.
Addon implementation example
++++++++++++++++++++++++++++
In your ``foo`` module, you want to specify that when any record is in ``pending``
state then it should be displayed in bold in the list view. Edit your foo_view.xml
file that define the views, and add the fonts attribute to the tree tag.
.. code-block:: xml
<tree string="Foo List View" fonts="bold:state=='pending'">
[...]
</tree>

View File

@ -15,3 +15,4 @@ New feature merges
api/user_img_specs
api/need_action_specs
api/font_style

View File

@ -222,6 +222,7 @@
<rng:ref name="overload"/>
<rng:optional><rng:attribute name="string"/></rng:optional>
<rng:optional><rng:attribute name="colors"/></rng:optional>
<rng:optional><rng:attribute name="fonts"/></rng:optional>
<rng:optional>
<rng:attribute name="editable">
<rng:choice>