'Apply group restrictions,  may be set at view level or model level::
* at view level this means the element should be made invisible to
people who are not members
* at model level (exclusively for fields, obviously), this means
the field should be completely removed from the view, as it is
completely unavailable for non-members
:return: True if field should be included in the result of fields_view_get'

def _apply_group(self, model, node, modifiers, fields):

    Model = self.env[model]
    if ((node.tag == 'field') and (node.get('name') in Model._fields)):
        field = Model._fields[node.get('name')]
        if (field.groups and (not self.user_has_groups(groups=field.groups))):
            node.getparent().remove(node)
            fields.pop(node.get('name'), None)
            return False
    if node.get('groups'):
        can_see = self.user_has_groups(groups=node.get('groups'))
        if (not can_see):
            node.set('invisible', '1')
            modifiers['invisible'] = True
            if ('attrs' in node.attrib):
                del node.attrib['attrs']
        del node.attrib['groups']
    return True
