title: OpenERP (XML) - hide view depending on access rights group
body: <p>I need to hide view that I create for users that do not have specific access rights group. I know I can use <code>groups</code> attribute for every field that I add in my view, so those users would not see it. But it is quite redundant as I need to hide every field in that view. So maybe there is some way that I can just hide whole view? In this example it hides for every field, because group is added for those fields.</p>
  
  <pre><code>   &lt;record id="view_partner_additional_view" model="ir.ui.view"&gt;
          &lt;field name="name"&gt;res.partner.patient.form.inherit&lt;/field&gt;
          &lt;field name="model"&gt;res.partner&lt;/field&gt;
          &lt;field name="priority"&gt;2&lt;/field&gt;
          &lt;field name="inherit_id" ref="base.view_partner_form"/&gt;
          &lt;field name="arch" type="xml"&gt;
             &lt;label for="is_company" string="Is a Company?" position="after"&gt;
                  &lt;field name="is_something"                          
                      attrs="{'invisible': [('is_company','=',True)]}" 
                      groups="some_grp"/&gt;             
                  &lt;field name="is_something2" 
                      attrs="{'invisible': [('is_company','=',False)]}" 
                      groups="some_grp"/&gt;                 
             &lt;/label&gt;
          &lt;/field&gt;
      &lt;/record&gt;
  </code></pre>
  
  <p>Is it possible to somehow wrap whole view and define it that it will be invisible to user that does not have 'some_grp' access rights group? What I mean is that I would need to add groups attribute once, not for every field. I tried wrapping everything with <code>div</code> and then adding <code>groups</code> attribute there, but I got error, because you can't wrap it everything like that.</p>