跳至内容
菜单
此问题已终结
3 回复
13221 查看

Hi,

Working on Odoo13, when creating a new contact (individual) in debug mode there is a field where it let you chose direction type (private, delivery...).

How can grant permission to a specific group of users to this field?

形象
丢弃
最佳答案

Hi, Kiko Rivera


groups="base.group_no_one"  is used for showing fields  only in debug mode
 
<field name="type" groups="base.group_no_one" attrs="{'invisible': [('is_company','=', True)], 'readonly': [('user_ids', '!=', [])]}"/>

If you want to  give access to any other groups assign multiple groups for that field ,

<field name="type" groups="base.group_no_one,base.user_admin" attrs="{'invisible': [('is_company','=', True)], 'readonly': [('user_ids', '!=', [])]}"/>
形象
丢弃
编写者 最佳答案

How can I identify all groups available in Odoo?

形象
丢弃
最佳答案

Hello Kiko Rivera,

Yes, you can very well do this by assigning group to that particular field .

for reference, please consider this ...

<field name ="test" groups="group_name"/>

you can also define multiple group using comma
I hope you will understand this
Thank you....

形象
丢弃
相关帖文 回复 查看 活动
0
8月 25
863
0
7月 25
581
1
7月 25
793
0
6月 25
700
1
5月 25
1348