Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ

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









Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 11 24
1429
3
thg 4 23
17974
1
thg 12 22
14132
1
thg 2 25
5251
0
thg 3 15
4453