콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
7482 화면

Hi,


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">
<div>
<field name="responsible_ids" context="{'default_groups_ref': ['pdm.group_team_member']}"/>
</div>
</page>
아바타
취소
베스트 답변

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"/>
</search>

Whenever your field this stated as follows:

'resposible_ids' : fields.many2one('res.users', 'Responsible'),
or
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.

관련 게시물 답글 화면 활동
0
12월 24
994
3
6월 16
8802
1
5월 16
5751
1
11월 22
3824
8
10월 22
32000