Odoo Help


How to define custom list column for widget?

Ratmil Torres
on 2/10/15, 2:27 PM 1,326 views

I am developing a custom widget.

Something like:

instance.web.form.widgets.add('MyWidget', 'instance.mymodule.MyWidget');

instance.mymodule.MyWidget = instance.web.form.AbstractField.extend( {
    template: "MyTemplate",

   //Other definitions...


This is working OK. Now I want to define how the cells for a treeview look for this widget.

This is what I've tried:

instance.web.list.columns.add('MyWidget', 'instance.fieldservice.MyColumnList');

instance.fieldservice.MyColumnList = instance.web.list.Column.extend({
        format: function (row_data, options) {
            return 'MyColumn';



Ratmil Torres
On 2/10/15, 3:05 PM

I found the answer:

instance.web.list.columns.add('field.MyWidget', 'instance.fieldservice.MyColumnList');

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: 2/10/15, 2:27 PM
Seen: 1326 times
Last updated: 3/16/15, 8:10 AM