Hide Lines On Tree View - Openerp 7
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
Solution 1:
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.
<fieldname="one2many_field_name"domain="[('relational_model_field','operator','value')]"><tree><fieldname="field1" /><fieldname="field2" /><fieldname="field3" /></tree></field>
And to set domain for default tree view, use domain with action.
<recordid="action_id"model="ir.actions.act_window"><fieldname="name">Action Name</field><fieldname="res_model">model</field><fieldname="view_type">form</field><fieldname="domain">[('field','operator','value')]</field><fieldname="view_mode">tree,form</field></record>
Post a Comment for "Hide Lines On Tree View - Openerp 7"