Odoo Help


How do I filter selection from form view?

Gavin Yap
on 5/11/16, 9:26 AM 1,011 views


Say I want to select from a list of users from the res.users model that belongs to a certain group.

Below is a snippet of code from my form view showing that I'm trying to use context to filter

<page string="Team">
<field name="responsible_ids" context="{'default_groups_ref': ['pdm.group_team_member']}"/>
Jose Vasquez
On 5/11/16, 10:01 AM

Hi Gavin Yap

To filter by user, it is not necessary to place domain, simply the name of your field. Try this.

<search string="Search...">
    <field name="responsible_ids"/>

Whenever your field this stated as follows:

'resposible_ids' : fields.many2one('res.users', 'Responsible'),
resposible_ids = fields.Many2one('res.users', 'Responsible')

I hope to help you, regards.

Hi thanks for your help, but the solution you provide does not answer my question. What I need is that when I select my team for an Object, from the res.users model, I would like to select them from a certain group.

Gavin Yap
on 5/12/16, 3:47 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: 5/11/16, 9:26 AM
Seen: 1011 times
Last updated: 5/11/16, 10:01 AM