Title: Eric CAUDAL
I would follow what is done in the following code:

    <!-- CRM Lead Tree View -->

    <record model="ir.ui.view" id="crm_case_tree_view_leads">
        <field name="name">Leads</field>
        <field name="model">crm.lead</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="Leads"  colors="blue:state=='pending';grey:state in ('cancel', 'done')">
                <field name="date_deadline" invisible="1"/>
                <field name="create_date"/>
                <field name="name" string="Subject"/>
                <field name="contact_name"/>
                <field name="country_id" invisible="context.get('invisible_country', True)" />
                <field name="email_from"/>
                <field name="phone"/>

                <field name="categ_id" invisible="1"/>
                <field name="type_id" invisible="1"/>
                <field name="referred" invisible="1"/>
                <field name="channel_id" invisible="1"/>
                <field name="subjects" invisible="1"/>

                <field name="stage_id"/>
                <button name="stage_previous" string="Previous Stage"
                    states="open,pending" type="object" icon="gtk-go-back" />
                <button name="stage_next" string="Next Stage"
                    states="open,pending" type="object"
                    icon="gtk-go-forward" />
                <field name="section_id" invisible="context.get('invisible_section', True)" />
                <field name="user_id" />
                <field name="state" />
                <button name="case_open" string="Open"
                    states="draft,pending" type="object"
                    icon="gtk-go-forward" />
                <button name="case_close" string="Close"
                    states="open,draft,pending" type="object"
                    icon="gtk-close" />
                <button name="%(crm.action_crm_lead2opportunity_partner)d"
                    string="Convert to Opportunity"
                    states="draft,open,pending" icon="gtk-index"
                    type="action" />
                <button name="case_escalate" string="Escalate"
                    states="open,draft,pending" type="object"
                    icon="gtk-go-up" />
            </tree>
        </field>
    </record>

You need to place your png file in the following directory:path-to-your-openerp/openerp/addons/web/static/src/img/icons



openerp
Eric CAUDAL, Elico Corp, Shanghai.
eric.cau...@elico-corp.com
Cell: + 86 186 2136 1670. Skype: elico.corp
Premium Certified Training Partner - OpenERP Ready Partner.

Premium CTP
http://www.openerp.net.cn
On 06/27/2012 06:52 PM, Sven Petersen wrote:

Hello Community!

does anyone know of a Solution or Example for displaying (custom) icons in a Tree View (OpenERP 6.1)?

Thanks in Advance!

with kind regards,

conexus,
Sven Petersen



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : openerp-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp

Reply via email to