Attrs is to be used to hide columns / fields conditionally but not the
record, to hide records domain must be used.
If there is default tree view and you want to hide records from there then you must pass domain with action. And suppose there is one2many field and into that you want to hide records then you must set domain directly to that field.
You can use domain in following manner for one2many fields.
<field name="one2many_field_name" domain="[('relational_model_field','operator','value')]">
<tree>
<field name="field1" />
<field name="field2" />
<field name="field3" />
</tree>
</field>
And to set domain for default tree view, use domain with action.
<record id="action_id" model="ir.actions.act_window">
<field name="name">Action Name</field>
<field name="res_model">model</field>
<field name="view_type">form</field>
<field name="domain">[('field','operator','value')]</field>
<field name="view_mode">tree,form</field>
</record>