Community mailing list archives

Re: track_visibility of many2many - get names not ids

Maxim Litnitskiy
- 11/05/2014 10:46:06
Trying to find a work around.
Added related field to many2many column like this:

organization = fields.Many2many('custom_contacts.organization', string=_('Organization'))
organization_names = fields.Char(string=_('Organizations'), select=1,
        track_visibility='onchange', compute='_get_organization_names', store=True)
    def _get_organization_names(self):
        if self.organization:
            self.organization_names = ', '.join([ for k in self.organization])

This makes it possible to group_by many2many field.
But  track_visibility does not work at all.
I event added 

<field name='organization' widget='many2many_tags'/>
                            <field name='organization_names' invisible='0'/>

2014-11-03 21:02 GMT+04:00 Maxim Litnitskiy <>:
Hi all!
I have the following piese of code -
When  I change group I get on the chatter:
 • Group:, 5) →,)

Is there a way to show group names?