Book Image

Odoo Development Essentials

Book Image

Odoo Development Essentials

Overview of this book

Table of Contents (17 chapters)
Odoo Development Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Window actions


Window actions give instructions to the client-side user interface. When a user clicks on a menu item or a button to open a form, it's the underlying action that instructs the user interface what to do.

We will start by creating the window action to be used on the menu items, to open the to-do tasks and stages views. Create the todo_view.xml data file with the following code:

<?xml version="1.0"?>
<openerp>
  <data>
    <act_window id="action_todo_stage" name="To-Do Task Stages" res_model="todo.task.stage" view_mode="tree,form" />

    <act_window id="todo_app.action_todo_task" name=" To-Do Tasks" res_model="todo.task" view_mode="tree,form,calendar,gantt,graph" target="current " context="{'default_user_id': uid}"
        domain="[]"
        limit="80" />

    <act_window id="action_todo_task_stage" name="To-Do Task Stages" res_model="todo.task.stage" src_model="todo.task"
        multi="False"/> </data>
</openerp>

Window actions...