Hi,
here is example of Form View
Add this inside your form view:
<record id = "view_form_model_name" model = "ir.ui.view"> <field name = "name" >your.model.form </field> <field name = "model" >your.model </field> <field name = "arch" type = "xml" > <form> <sheet> <!-- Normal Field --> <group> <!-- Ready: green --> <div modifiers='{"invisible": [["status", "in", ["ready", "unready"]]]}' class = "text-success" > <field name = "status" readonly = "1" /> </div> <!-- Unready: red --> <div attrs = "{'invisible': [('status', '!=', 'unready')]}" class = "text-danger" > <field name = "status" readonly = "1" /> </div> <!-- All other statuses --> <div modifiers='{"invisible": [["status", "in", ["ready", "unready"]]]}'"> <field name = "status" readonly = "1"/> </div> </group> </sheet> </form> </field> </record>
i hope it is use full