A window action gives instructions to the GUI client and is usually used by menu items or buttons in views. It tells the GUI what model to work on, and what views to make available. These actions can filter the records to be available, using a domain filter, and can set default values and filters through the context attribute.
We will add window actions to the views/todo_menu.xml data file, which will be used by the menu items created in the previous section. Edit the file, and make sure they are added before the menu items:
<!-- Actions for the menu items --> <act_window id="action_todo_stage" name="To-Do Task Stages" res_model="todo.task.stage" view_mode="tree,form" target="current" context="{'default_state': 'open'}" domain="[]" ...