Skip to Content
Menu
This question has been flagged
2 Replies
1478 Views

hello,

I want only administrators in the field of many2one how to can do?


Avatar
Discard

Please use a clear subject and give more details to get the help.

Author Best Answer

in many2one area the comings must be admin, not ordinary users

form will appear in the

. py file

 user_id = fields.Many2one('res.users', string='Requester', index=True, track_visibility='onchange', default=lambda self: self.env.user,  domain = [('user_id', '=', self.user_id.id)]) 

 .xml file

<field name="user_id" options="{'no_create_edit': True}"  />

Avatar
Discard
Related Posts Replies Views Activity
1
Nov 22
14649
3
Aug 22
10761
2
Aug 22
3050
0
Jul 22
835
2
Oct 21
1437