815e8929f8a98e081d653797c39f3601e628c648
[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                         </group>
86                     </sheet>
87                 </form>
88             </field>
89         </record>
90
91
92         <record model="ir.ui.view" id="topic_kanban_view">
93             <field name="name">topic.kanban</field>
94             <field name="model">todolist.topic</field>
95             <field name="arch" type="xml">
96                 <kanban default_group_by="activated">
97                     <templates>
98                         <t t-name="kanban-box">
99                             <div class="oe_kanban_card oe_semantic_html_override oe_kanban_global_click_edit">
100                                 <div class="oe_dropdown_kanban">
101
102                                     <div class="oe_dropdown_toggle">
103                                         <span class="oe_e">X</span>
104                                         <ul class="oe_dropdown_menu">
105                                             <li><a type="delete">Delete</a></li>
106                                            </ul>
107                                     </div>
108                                     <div class="oe_clear" />
109                                 </div>
110                                 <div t-attf-class="oe_kanban_content">
111                                     <h1><field name="name" /></h1>
112                                     <field name="description" />
113                                 </div>
114                             </div>
115                         </t>
116                     </templates>
117                 </kanban>
118             </field>
119         </record>
120
121
122         <record model="ir.ui.view" id="task_form_view">
123             <field name="name">task.form</field>
124             <field name="model">todolist.task</field>
125             <field name="arch" type="xml">
126                 <form string="Task Form" version="7.0">
127                     <header>
128                         <button string="Reset" type="object" name="action_draft" states="proposal,approved,started" class="oe_highlight" />
129                         <button string="Propose" type="object" name="action_propose" states="draft,approved,started" class="oe_highlight" />
130                         <button string="Approve" type="object" name="action_approve" states="draft,proposal" class="oe_highlight" />
131                         <button string="Start" type="object" name="action_start" states="draft,approved" class="oe_highlight" />
132                         <button string="Stop" type="object" name="action_done" states="started" class="oe_highlight" />
133                         <field name="state" widget="statusbar" />
134                     </header>
135                     <sheet>
136                         <group>
137                             <field name="name"/>
138                             <field name="description" />
139                             <field name="milestone" />
140                             <field name="planned" />
141                             <field name="manday" />
142                             <field name="priority" />
143                             <field name="container_id" />
144                         </group>
145                     </sheet>
146                  </form>
147             </field>
148         </record>
149
150
151         <record model="ir.actions.act_window" id="todolist_list_action">
152             <field name="name">list of to do lists</field>
153             <field name="res_model">todolist.container</field>
154             <field name="view_mode">tree,form</field>
155             <field name="help" type="html">
156                 <p class="oe_view_nocontent_create">Create your first to do list</p>
157             </field>
158         </record>
159
160
161         <record model="ir.actions.act_window" id="topic_list_action">
162             <field name="name">List of topics</field>
163             <field name="res_model">todolist.topic</field>
164             <field name="view_mode">kanban,form</field>
165             <field name="help" type="html">
166                 <p class="oe_view_nocontent_create">Créer your first topic</p>
167             </field>
168         </record>
169
170
171         <record model="ir.actions.act_window" id="task_list_action">
172             <field name="name">List of tasks</field>
173             <field name="res_model">todolist.task</field>
174             <field name="view_mode">tree,form</field>
175             <field name="help" type="html">
176                 <p class="oe_view_nocontent_create">Create your first task</p>
177             </field>
178         </record>
179
180
181         <menuitem id="main_minitools_menu" name="Mini Tools" />
182
183         <menuitem id="mt_todolist_menu" name="To do list" parent="main_minitools_menu" groups="group_todolist_user" />
184
185         <menuitem id="mt_todolist_container_menu" name="Lists" parent="mt_todolist_menu" action="todolist_list_action"/>
186
187         <menuitem id="mt_todolist_task_menu" name="Tasks" parent="mt_todolist_menu" action="task_list_action" />
188
189         <menuitem id="mt_settings_menu" name="Settings" parent="main_minitools_menu" groups="group_todolist_manager" />
190
191         <menuitem id="mt_todolist_topic_menu" name="Topics" parent="mt_settings_menu" action="topic_list_action" />
192
193
194
195     </data>
196 </openerp>