be8125431b4d54351a687660c28470cf0541dd5c
[OpenERP/todolist.git] / views / todolist.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <openerp>
3     <data>
4
5
6         <record model="ir.ui.view" id="todolist_form_view">
7             <field name="name">todolist.form</field>
8             <field name="model">todolist.container</field>
9             <field name="arch" type="xml">
10                 <form string="Todolist Form" version="7.0">
11                     <header>
12                         <button string="Start" type="object" name="action_start" states="draft" class="oe_highlight" />
13                         <button string="Stop" type="object" name="action_stop" states="pending" class="oe_highlight" />
14                         <button string="Restart" type="object" name="action_restart" states="pending,done" class="oe_highlight" />
15                         <field name="state" widget="statusbar" />
16                     </header>
17                     <sheet>
18                         <group colspan="4" col="3">
19                             <label for="name" colspan="1" />
20                             <field name="name" colspan="2" nolabel="1" />
21                             <label for="description" colspan="1" />
22                             <field name="description" colspan="2" nolabel="1" />
23                             <label for="number_tasks" colspan="1" />
24                             <field name="number_tasks" colspan="2" nolabel="1" />
25                             <label for="number_tasks_done" colspan="1" />
26                             <field name="number_tasks_done" colspan="2" nolabel="1" />
27                             <field name="progress_tasks" colspan="3" widget="progressbar" />
28                         </group>
29                         <notebook colspan="4">
30                             <page string="Dates">
31                                 <group colspan="4" col="1">
32                                     <label for="target" />
33                                     <field name="target" nolabel="1" />
34                                     <label for="milestone" />
35                                     <field name="milestone" nolabel="1" />
36                                     <label for="manday" />
37                                     <field name="manday" nolabel="1" />
38                                 </group>
39                             </page>
40                             <page string="Tasks">
41                                 <group colspan="4" col="1">
42                                     <field name="tasks" nolabel="1" mode="tree">
43                                         <tree string="Tasks" editable="1" colors="red:priority=='essential';
44                                                                                     #FF5800:priority=='necessary';
45                                                                                     black:priority=='useful'">
46                                             <field name="name"/>
47                                             <field name="description"/>
48                                             <field name="milestone"/>
49                                             <field name="planned"/>
50                                             <field name="manday"/>
51                                             <field name="priority"/>
52                                         </tree>
53                                     </field>
54                                 </group>
55                             </page>
56                             <page string="Topics">
57                                 <group colspan="4" col="1">
58                                     <field name="topics_id"/>
59                                 </group>
60                             </page>
61                         </notebook>
62                     </sheet>
63                 </form>
64             </field>
65         </record>
66
67
68         <record model="ir.ui.view" id="topic_form_view">
69             <field name="name">topic.form</field>
70             <field name="model">todolist.topic</field>
71             <field name="arch" type="xml">
72                 <form string="Topic Form" version="7.0">
73                     <sheet>
74                         <group colspan="4" col="4">
75                             <label for="name" colspan="3"/>
76                             <label for="activated" colspan="1"/>
77                             <field name="name" nolabel="1" colspan="3"/>
78                             <field name="activated" nolabel="1" colspan="1"/>
79                         </group>
80                         <group col="1">
81                             <label for="description"/>
82                             <field name="description" nolabel="1"/>
83                             <label for="nb_lists" />
84                             <field name="nb_lists" nolabel="1" />
85                             <field name="progress_tasks" colspan="3" widget="progressbar" />
86                         </group>
87                     </sheet>
88                 </form>
89             </field>
90         </record>
91
92
93         <record model="ir.ui.view" id="topic_kanban_view">
94             <field name="name">topic.kanban</field>
95             <field name="model">todolist.topic</field>
96             <field name="arch" type="xml">
97                 <kanban default_group_by="activated">
98                     <templates>
99                         <t t-name="kanban-box">
100                             <div class="oe_kanban_card oe_semantic_html_override oe_kanban_global_click_edit">
101                                 <div class="oe_dropdown_kanban">
102
103                                     <div class="oe_dropdown_toggle">
104                                         <span class="oe_e">X</span>
105                                         <ul class="oe_dropdown_menu">
106                                             <li><a type="delete">Delete</a></li>
107                                            </ul>
108                                     </div>
109                                     <div class="oe_clear" />
110                                 </div>
111                                 <div t-attf-class="oe_kanban_content">
112                                     <h1><field name="name" /></h1>
113                                     <field name="description" />
114                                 </div>
115                             </div>
116                         </t>
117                     </templates>
118                 </kanban>
119             </field>
120         </record>
121
122
123         <record model="ir.ui.view" id="task_form_view">
124             <field name="name">task.form</field>
125             <field name="model">todolist.task</field>
126             <field name="arch" type="xml">
127                 <form string="Task Form" version="7.0">
128                     <header>
129                         <button string="Reset" type="object" name="action_draft" states="proposal,approved,started" class="oe_highlight" />
130                         <button string="Propose" type="object" name="action_propose" states="draft,approved,started" class="oe_highlight" />
131                         <button string="Approve" type="object" name="action_approve" states="draft,proposal" class="oe_highlight" />
132                         <button string="Start" type="object" name="action_start" states="draft,approved" class="oe_highlight" />
133                         <button string="Stop" type="object" name="action_done" states="started" class="oe_highlight" />
134                         <field name="state" widget="statusbar" />
135                     </header>
136                     <sheet>
137                         <group>
138                             <field name="name"/>
139                             <field name="description" />
140                             <field name="milestone" />
141                             <field name="planned" />
142                             <field name="manday" />
143                             <field name="priority" />
144                             <field name="container_id" />
145                         </group>
146                     </sheet>
147                  </form>
148             </field>
149         </record>
150
151
152         <record model="ir.actions.act_window" id="todolist_list_action">
153             <field name="name">list of to do lists</field>
154             <field name="res_model">todolist.container</field>
155             <field name="view_mode">tree,form</field>
156             <field name="help" type="html">
157                 <p class="oe_view_nocontent_create">Create your first to do list</p>
158             </field>
159         </record>
160
161
162         <record model="ir.actions.act_window" id="topic_list_action">
163             <field name="name">List of topics</field>
164             <field name="res_model">todolist.topic</field>
165             <field name="view_mode">kanban,form</field>
166             <field name="help" type="html">
167                 <p class="oe_view_nocontent_create">Créer your first topic</p>
168             </field>
169         </record>
170
171
172         <record model="ir.actions.act_window" id="task_list_action">
173             <field name="name">List of tasks</field>
174             <field name="res_model">todolist.task</field>
175             <field name="view_mode">tree,form</field>
176             <field name="help" type="html">
177                 <p class="oe_view_nocontent_create">Create your first task</p>
178             </field>
179         </record>
180
181
182         <menuitem id="main_minitools_menu" name="Mini Tools" />
183
184         <menuitem id="mt_todolist_menu" name="To do list" parent="main_minitools_menu" groups="group_todolist_user" />
185
186         <menuitem id="mt_todolist_container_menu" name="Lists" parent="mt_todolist_menu" action="todolist_list_action"/>
187
188         <menuitem id="mt_todolist_task_menu" name="Tasks" parent="mt_todolist_menu" action="task_list_action" />
189
190         <menuitem id="mt_settings_menu" name="Settings" parent="main_minitools_menu" groups="group_todolist_manager" />
191
192         <menuitem id="mt_todolist_topic_menu" name="Topics" parent="mt_settings_menu" action="topic_list_action" />
193
194
195
196     </data>
197 </openerp>