Now that we have a model to store our data, let's make it available on the user interface.
All we need to do is to add a menu option to open the
To-do Task model so that it can be used. This is done using an XML file. Just as in the case of models, some people consider it good practice to keep the view definitions inside a
We will create a new
todo_view.xml data file in the module's top directory, and it will declare a menu item and the action performed by it:
<?xml version="1.0"?> <openerp> <data> <!-- Action to open To-do Task list --> <act_window id="action_todo_task" name="To-do Task" res_model="todo.task" view_mode="tree,form" /> <!-- Menu item to open To-do Task list --> <menuitem id="menu _todo_task" ...