Odoo Help


How can I add and refer to custom images or icons in my custom module in odoo 9? I can only seem to reference the standard images.

on 9/9/16, 10:20 AM 1,053 views

I want to put an image inside a button of a custom module in odoo 9.

I have 2 buttons in my_module.xml:

<?xml version="1.0"?>
        <record id="view_my_module_tree" model="ir.ui.view">
            <field name="name">my.module.tree</field>
            <field name="model">my.module</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="my_module_tree" create="false" delete="false">
                    <button name="button_form" icon="cat" type="object"/>
                    <button name="button_form" icon="dog" type="object"/>                   

That works if the icons 'cat.png' and dog.png' are inside 'addons/web/static/src/img/icons/'. But I want to put this icons in my custom module.

I have created the 'my_module/static/src/img/icons/' hierarchy and put both images inside, but none of them appear in the buttons.

What I am doing wrong?

Do I need to put something in openerp.py file?

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 9/9/16, 10:20 AM
Seen: 1053 times
Last updated: 9/9/16, 10:23 AM