This question has been flagged

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









Avatar
Discard