title: How to hide a custom Button in tree view
body: <p><img src="https://i.stack.imgur.com/rgv9s.png" alt="]([![https://imgur.com/a/CzXG7YL"></p>
  
  <p>I have a custom button "View All" in my List view, i want it to be visible only to a user who have a certain group access how can i achieve it?.</p>
  
  <p>I tried adding groups attribute to the button but it didn't work,</p>
  
  <pre><code>&lt;template xml:space="preserve"&gt;
      &lt;t t-extend="ListView.buttons"&gt;
          &lt;t  t-jquery="button.o_list_button_add" t-operation="before"&gt;
              &lt;button t-if="widget.modelName == 'leave.request.allocation'" type="button" class="btn btn-primary btn-sm oe_filter_button" accesskey="f" groups="hr_holidays.group_hr_holidays_manager"&gt;
                  View All
              &lt;/button&gt; 
          &lt;/t&gt;
      &lt;/t&gt;
  </code></pre>
  
  <p></p>