Odoo Help


Is it possible to display html in tree view

Mind And Go
on 12/22/13, 9:35 AM 4,093 views


I succeeded in displaying html in text field thanks to the widget="html" in the fomr view of order lines Is it possible to do as well in the tree view? Using type="html" nor widget="html" failed.

Thanks in advanced

I tried this one without success : https://www.openerp.com/apps/6.1/trp_web_treeview_html_widget/ No error is displayed or thrown. Nothing special is done

Mind & Go, Mind And Go
on 12/28/13, 9:40 AM

Obviously not possible in v7

Mind & Go, Mind And Go
on 5/27/14, 4:39 PM
chavada viki
On 7/17/17, 6:28 AM

To enable the HTML in list view you need to override the method _format() as below.(for Odoo v10)


    odoo.define('html_in_tree_field.web_ext', function (require) {

        "use strict";

     var Listview = require('web.ListView');

     var formats = require('web.formats');



         _format: function (row_data, options) {

      // Removed _.escape() function to display html content.

      // Before : return _.escape(formats.format_value(row_data[this.id].value, this, options.value_if_empty));

      return formats.format_value(row_data[this.id].value, this, options.value_if_empty);




**XML to add above JS.**

    <?xml version="1.0" encoding="utf-8"?>


     <template id="assets_ext" inherit_id="web.assets_backend">

       <xpath expr="." position="inside">

           <script type="text/javascript" src="/html_in_tree_field/static/src/js/web_ext.js"></script>








    'data': [






On 2/14/18, 6:08 AM

Hello, you can find something here for v7 :


On 7/17/17, 6:47 AM

thanks for your answer, chavada viki. I faced with similar issue and it worked!

On 1/12/16, 4:24 AM

i am facing same issue. did you find any solution for this?

Did you find an answer for this? Would need this functionality as well.

Forsberg Services Ltd, Raphael
on 3/16/16, 5:11 AM

Not Yet. but i find one alternate solution for this. i take one new text field. for form view i display field which has widget as html. and for tree view i display copied text field(display as normal text). did you get??

on 3/16/16, 5:18 AM

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: 12/22/13, 9:35 AM
Seen: 4093 times
Last updated: 2/14/18, 6:08 AM