Search code examples
odooodoo-8odoo-10odoo-9qweb

How to include a checkbox image in a Qweb Report?


Is there way to change checkbox image in qweb report. For example i want to change standard "V" to image like this:

enter image description here

Is it possible?


Solution

  • Solution 0

    Add the file to your module, for example store it in the path /module_name/static/src/img/image_name.png

    Then now you can add the image to the Qweb Report:

    <img t-att-src="'/module_name/static/src/img/image_name.png'" />
    

    Note: respect the order and the type of the quotes

    Solution 1

    Maybe it is useful to create ul html list with all the elements you want to add:

    <style>
        .icon_list {
            list-style-image: url('/module_name/static/src/img/image_name.png');
        }
    </style>
    
    <!-- [...] -->
    
    <ul class="icon_list" >
        <li>Coffee</li>
        <li>Tea</li>
        <li>Coca Cola</li>
    </ul>
    

    (I didn´t try it but it should work as well)