コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
7480 ビュー

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
993
3
6月 16
8802
1
5月 16
5751
1
11月 22
3824
8
10月 22
31999