跳至内容
菜单
此问题已终结

Hello everyone,

@Niyas Raphy has answered to question on this post: https://www.odoo.com/fr_FR/forum/aide-1/hide-groups-from-user-form-121936

The answer is:

You can check with "_update_user_groups_view"  function in the res_users.py (base -> res -> res_users.py ).

    To hide your group,

    field_name = name_boolean_group(g.id)
    group_no_one = view.env.ref('base.group_no_one')
    your_grp = view.env.ref('module_name.group_name')
    if g == group_no_one or g == your_grp:
        # make the group_no_one invisible in the form view
        xml2.append(E.field(name=field_name, invisible="1", **attrs))
    else:
        xml2.append(E.field(name=field_name, **attrs))


Can anyone help me inherit this code and hide the group "Use products on vendor bills"?

PS: I did not commented on the original post because I do not have enough karma for doing so.

Thank you very much in advance

Best regards

Paulo









形象
丢弃
相关帖文 回复 查看 活动
1
11月 24
1459
3
4月 23
18006
1
12月 22
14161
1
2月 25
5257
0
3月 15
4484