Sur task, ajout du chatter
[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">container.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="todolist_kanban_view">
69             <field name="name">container.kanban</field>
70             <field name="model">todolist.container</field>
71             <field name="arch" type="xml">
72                 <kanban>
73                     <templates>
74                         <t t-name="kanban-box">
75                             <div class="oe_kanban_card oe_semantic_html_override oe_kanban_global_click_edit">
76                                 <div class="oe_dropdown_kanban">
77
78                                     <div class="oe_dropdown_toggle">
79                                         <span class="oe_e">X</span>
80                                         <ul class="oe_dropdown_menu">
81                                             <li><a type="delete">Delete</a></li>
82                                            </ul>
83                                     </div>
84                                     <div class="oe_clear" />
85                                 </div>
86
87                                 <div t-attf-class="oe_kanban_content">
88                                     <h2><field name="name" /></h2>
89                                     <field name="description" />
90                                 </div>
91
92                             </div>
93                         </t>
94                     </templates>
95                 </kanban>
96             </field>
97         </record>
98
99
100         <record model="ir.ui.view" id="topic_form_view">
101             <field name="name">topic.form</field>
102             <field name="model">todolist.topic</field>
103             <field name="arch" type="xml">
104                 <form string="Topic Form" version="7.0">
105                     <sheet>
106                         <group colspan="4" col="4">
107                             <label for="name" colspan="3"/>
108                             <label for="activated" colspan="1"/>
109                             <field name="name" nolabel="1" colspan="3"/>
110                             <field name="activated" nolabel="1" colspan="1"/>
111                         </group>
112                         <group col="1">
113                             <label for="description"/>
114                             <field name="description" nolabel="1"/>
115                             <label for="nb_lists" />
116                             <field name="nb_lists" nolabel="1" />
117                             <field name="progress_tasks" colspan="3" widget="progressbar" />
118                         </group>
119                     </sheet>
120                 </form>
121             </field>
122         </record>
123
124
125         <record model="ir.ui.view" id="topic_kanban_view">
126             <field name="name">topic.kanban</field>
127             <field name="model">todolist.topic</field>
128             <field name="arch" type="xml">
129                 <kanban default_group_by="activated">
130                     <templates>
131                         <t t-name="kanban-box">
132                             <div class="oe_kanban_card oe_semantic_html_override oe_kanban_global_click_edit">
133                                 <div class="oe_dropdown_kanban">
134
135                                     <div class="oe_dropdown_toggle">
136                                         <span class="oe_e">X</span>
137                                         <ul class="oe_dropdown_menu">
138                                             <li><a type="delete">Delete</a></li>
139                                            </ul>
140                                     </div>
141                                     <div class="oe_clear" />
142                                 </div>
143                                 <div t-attf-class="oe_kanban_content">
144                                     <h1><field name="name" /></h1>
145                                     <field name="description" />
146                                 </div>
147                             </div>
148                         </t>
149                     </templates>
150                 </kanban>
151             </field>
152         </record>
153
154
155         <record model="ir.ui.view" id="task_form_view">
156             <field name="name">task.form</field>
157             <field name="model">todolist.task</field>
158             <field name="arch" type="xml">
159                 <form string="Task Form" version="7.0">
160                     <header>
161                         <button string="Reset" type="object" name="action_draft" states="proposal,approved,started" class="oe_highlight" />
162                         <button string="Propose" type="object" name="action_propose" states="draft,approved,started" class="oe_highlight" />
163                         <button string="Approve" type="object" name="action_approve" states="draft,proposal" class="oe_highlight" />
164                         <button string="Start" type="object" name="action_start" states="draft,approved" class="oe_highlight" />
165                         <button string="Stop" type="object" name="action_done" states="started" class="oe_highlight" />
166                         <field name="state" widget="statusbar" />
167                     </header>
168                     <sheet>
169                         <group>
170                             <field name="name"/>
171                             <field name="description" />
172                             <field name="milestone" />
173                             <field name="planned" />
174                             <field name="manday" />
175                             <field name="priority" />
176                             <field name="container_id" />
177                         </group>
178                     </sheet>
179                     <div class="oe_chatter">
180                         <field name="message_follower_ids" widget="mail_followers"/>
181                         <field name="message_ids" widget="mail_thread" options="{'thread_level': 1}"/>
182                     </div>
183                  </form>
184             </field>
185         </record>
186
187
188         <record model="ir.ui.view" id="task_kanban_view">
189             <field name="name">task.kanban</field>
190             <field name="model">todolist.task</field>
191             <field name="arch" type="xml">
192                 <kanban default_group_by="priority">
193                     <templates>
194                         <t t-name="kanban-box">
195                             <div class="oe_kanban_card oe_semantic_html_override oe_kanban_global_click_edit">
196                                 <div class="oe_dropdown_kanban">
197
198                                     <div class="oe_dropdown_toggle">
199                                         <span class="oe_e">X</span>
200                                         <ul class="oe_dropdown_menu">
201                                             <li><a type="delete">Delete</a></li>
202                                            </ul>
203                                     </div>
204                                     <div class="oe_clear" />
205                                 </div>
206
207                                 <div t-attf-class="oe_kanban_content">
208                                     <h4><field name="name" /></h4>
209                                     <p><field name="description" /></p>
210                                     <p>Planned on <field name="planned" /></p>
211                                 </div>
212
213                             </div>
214                         </t>
215                     </templates>
216                 </kanban>
217             </field>
218         </record>
219
220         <record model="ir.actions.act_window" id="todolist_list_action">
221             <field name="name">list of to do lists</field>
222             <field name="res_model">todolist.container</field>
223             <field name="view_mode">kanban,form</field>
224             <field name="help" type="html">
225                 <p class="oe_view_nocontent_create">Create your first to do list</p>
226             </field>
227         </record>
228
229
230         <record model="ir.actions.act_window" id="topic_list_action">
231             <field name="name">List of topics</field>
232             <field name="res_model">todolist.topic</field>
233             <field name="view_mode">kanban,form</field>
234             <field name="help" type="html">
235                 <p class="oe_view_nocontent_create">Créer your first topic</p>
236             </field>
237         </record>
238
239
240         <record model="ir.actions.act_window" id="task_list_action">
241             <field name="name">List of tasks</field>
242             <field name="res_model">todolist.task</field>
243             <field name="view_mode">kanban,form</field>
244             <field name="help" type="html">
245                 <p class="oe_view_nocontent_create">Create your first task</p>
246             </field>
247         </record>
248
249
250         <menuitem id="main_minitools_menu" name="Mini Tools" />
251
252         <menuitem id="mt_todolist_menu" name="To do list" parent="main_minitools_menu" groups="group_todolist_user" />
253
254         <menuitem id="mt_todolist_container_menu" name="Lists" parent="mt_todolist_menu" action="todolist_list_action"/>
255
256         <menuitem id="mt_todolist_task_menu" name="Tasks" parent="mt_todolist_menu" action="task_list_action" />
257
258         <menuitem id="mt_settings_menu" name="Settings" parent="main_minitools_menu" groups="group_todolist_manager" />
259
260         <menuitem id="mt_todolist_topic_menu" name="Topics" parent="mt_settings_menu" action="topic_list_action" />
261
262
263
264     </data>
265 </openerp>