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