Adding content and widgets to a form view
The preceding recipe showed how to pick a specific view for an action. Now, we'll demonstrate how to make the form view more useful. In this recipe, we will use the form view that we defined earlier in the Having an action open a specific view recipe. In the form view, we will add the widgets and content.
How to do it...
- Define the basic structure of the form view:
<record id="form_all_customers" model="ir.ui.view"> Â Â Â Â <field name="name">All customers</field> Â Â Â Â <field name="model">res.partner</field> Â Â Â Â <field name="arch" type="xml"> Â Â Â Â Â Â Â Â <form> Â Â Â Â Â Â Â Â Â Â Â Â <!--form content goes here --> Â Â Â Â Â Â Â Â </form>...