Re: Referencing a Many2many field in a format string in a Kanban view

by

Hieu Nguyen

- 08/21/2015 03:31:54

Thank you for your response, Leonardo.

A single integer is what I get from `record.pages.raw_value[0]`
since odoo creates a separate table to store ids for many2many
relationships. Is there anyway we can reference many2many field in
{{ }} format string?

2015-08-10 15:16 GMT+02:00 Hieu Nguyen <hieutngn@gmail.com>:
> Hello everyone,
>
> In my Kaban views, I have a Many2many field named "pages". If i used " name="pages" />", it works fine and show the Many2many tags. However, if I
> use: "".
>
> The part {{ record.pages.raw_value[0].site }} return undefined when I check
> with Firebug.
I should check, but I think that ``raw_value`` returns just the list
of ids, so you can't refer to the related fields. In your case,
``record.pages.raw_value[0]`` is just a single integer (the id of the
first record), so ``.site`` is undefined