I want to hide all lines (not only there cointaner) in sequence tree view (the default view).
I must hide all lines if code != 'foo' but the attrs atribute don't work on tree views, so how can i filter/hide this?
I don't have any code already, because i'm newbie in openerp and i dont know what to change.
The model is ir.sequence and is view (i think).
Attrs is to be used to hide columns / fields conditionally but not therecord, 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>