Odoo Help


PLEASE HELP Many2many entries don't show up when I change how treeview columns are displayed

Henrique de Paula Lopes
on 10/31/16, 3:06 PM 602 views

Well, there's no simpler way to put it: I have a wizard that displays a many2many widget listing some entries. It all goes well until I edit, in the xml file, which columns from these entries are displayed.

class cest_wizard(models.TransientModel):
    _name = "account.product.fiscal.classification.cest_wizard"
    template_id = fields.Many2one('product.template', u'template', default=get_active_product_template, readonly=True)
    cest_ids = fields.Many2many(related='template_id.property_fiscal_classification.cest_ids')

here, cest_ids are a list of ids from the object whose form calls the widget. If I declare the widget as  

<field name="cest_ids" widget="many2many">

in the xml all the entries from the collection are correctly displayed. However, given that I want to show more columns than just the name of every object, I tried to change the piece of code above to 

<field name="cest_ids" widget="many2many"> 
     <tree string="Escolha o CEST mais apropriado">
          <field name="cest" />
          <field name="name" />

It simply stops working and shows nothing anymore (the table displays both columns but with zero entries). 

What am I doing wrong? 

Here's a visual example of how it works (and doesn't work): http://imgur.com/a/XbkLw

On 11/1/16, 12:55 AM

i am not sure but try it without


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: 10/31/16, 3:06 PM
Seen: 602 times
Last updated: 11/1/16, 12:55 AM