Having an action open a specific view
Window actions automatically determine the view to be used if none is given, but sometimes, we want an action to open a specific view.
We will create a basic form view for the hostel.room
model, and then we will create a new window action specifically to open that form view.
How to do it...
- Define the
hostel room
minimal tree and form view:<record id="hostel_room_view_tree" model="ir.ui.view"> <field name="name">Hostel Room List</field> <field name="model">hostel.room</field> <field name="arch" type="xml"> <tree> <field name="name"/> <field name="room_no"/> ...