* Emma [2012-05-03 15:33 +0200]:
Hi again,

Hello,

in the same context
as https://groups.google.com/forum/?fromgroups#!topic/tryton/eE1IKJpQKjg I
would like to be able to add icons in a tree view (in this case
tryton-dialog-error.svg) inside a tree view but I guess this could be
extended and render a binary field and well (scaled to fit the line height).

In fact it is already available because we use it for the icons.
in ir/ui/icon.xml:

        <record model="ir.ui.view" id="icon_view_tree">
            <field name="model">ir.ui.icon</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <![CDATA[
                <tree string="Icons" sequence="sequence">
                    <field name="name" icon="name"/>
                    <field name="module"/>
                    <field name="path"/>
                    <field name="sequence" tree_invisible="1"/>
                </tree>
                ]]>
            </field>
        </record>

the icon="name" will use the icon with the name coming from the name
field to display this icon.

--
Nicolas Évrard

B2CK SPRL
rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
E-mail/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: signature.asc
Description: Digital signature

Reply via email to