python - Hide some lines in odoo treeview -
i trying hide lines in tree view according specific flag, here tree view's xml code :
<record model='ir.ui.view' id='my_object_tree'> <field name="name">my_object.tree</field> <field name="model">my_object</field> <field name="arch" type="xml" > <tree string="title" attrs="{'invisible': [('my_flag','=',false)]}"> <field name="name"/> <field name="my_flag"/> </tree> </field> </record>
but seems "invisible" doesn't work here, can hide fields in case empty lines appear in tree view. there other solution please?
what objects appear in list view determined domain part of action definition:
<record model="ir.actions.act_window" id="my_object_action"> <field name="name">my_object.action</field> <field name="res_model">my_object</field> <field name="view_mode">tree,form</field> <field name="domain">[ ('my_flag', '=', true) ]</field> </record>
Comments
Post a Comment