[IMP] project*, resource: remove group_extended
[odoo/odoo.git] / addons / project_long_term / project_long_term_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5     <menuitem id="base.menu_project_long_term" name="Long Term Planning" parent="base.menu_main_pm" sequence="3"/>
6
7     # ------------------------------------------------------
8     # Project User Allocation
9     # ------------------------------------------------------
10
11         <record id="view_project_user_allocation_gantt" model="ir.ui.view">
12             <field name="name">project.user.allocation.gantt</field>
13             <field name="model">project.user.allocation</field>
14             <field name="type">gantt</field>
15             <field name="arch" type="xml">
16               <gantt date_start="date_start" date_stop="date_end" default_group_by="user_id">
17               </gantt>
18             </field>
19         </record>
20
21         <record id="view_project_user_allocation_calendar" model="ir.ui.view">
22             <field name="name">project.user.allocation.calendar</field>
23             <field name="model">project.user.allocation</field>
24             <field name="type">calendar</field>
25             <field eval="2" name="priority"/>
26             <field name="arch" type="xml">
27                 <calendar color="user_id" date_start="date_start" date_stop="date_end" day_length="12" string="Users">
28                     <field name="phase_id"/>
29                     <field name="project_id"/>
30                 </calendar>
31             </field>
32         </record>
33
34
35         <record id="view_project_user_allocation_form" model="ir.ui.view">
36             <field name="name">project.user.allocation.form</field>
37             <field name="model">project.user.allocation</field>
38             <field name="type">form</field>
39             <field name="arch" type="xml">
40                 <form string="Project User Allocation">
41                     <group colspan="4" col="6">
42                         <field name="user_id"/>
43                         <field name="phase_id"/>
44                         <field name="project_id"/>
45                         <field name="date_start"/>
46                         <field name="date_end"/>
47                     </group>
48                 </form>
49             </field>
50         </record>
51
52         <record id="view_project_user_allocation_list" model="ir.ui.view">
53             <field name="name">project.user.allocation.list</field>
54             <field name="model">project.user.allocation</field>
55             <field name="type">tree</field>
56             <field name="priority" eval="5"/>
57             <field name="arch" type="xml">
58                 <tree editable="bottom" string="Project User Allocation">
59                     <field name="user_id"/>
60                     <field name="phase_id"/>
61                     <field name="project_id"/>
62                 </tree>
63             </field>
64         </record>
65
66        <record id="view_project_user_allocation_search" model="ir.ui.view">
67             <field name="name">project.user.allocation.search</field>
68             <field name="model">project.user.allocation</field>
69             <field name="type">search</field>
70             <field name="arch" type="xml">
71                 <search string="Planning of Users">
72                     <group>
73                         <field name="user_id"/>
74                         <field name="phase_id"/>
75                         <field name="project_id"/>
76                     </group>
77                     <newline/>
78                     <group expand="0" string="Group By...">
79                         <filter name="user" string="User" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
80                         <separator orientation="vertical"/>
81                         <filter string="Project" icon="terp-folder-violet" domain="[]" context="{'group_by':'project_id'}"/>
82                         <filter string="Phase" icon="terp-project" domain="[]" context="{'group_by':'phase_id'}"/>
83                     </group>
84                 </search>
85             </field>
86         </record>
87        <record id="act_resouce_allocation" model="ir.actions.act_window">
88             <field name="name">Planning of Users</field>
89             <field name="res_model">project.user.allocation</field>
90             <field name="view_type">form</field>
91             <field name="view_mode">gantt,tree,form,calendar</field>
92              <field name="context">{}</field>
93             <field name="search_view_id" ref="view_project_user_allocation_search"/>
94         </record>
95
96
97     # ------------------------------------------------------
98     # Project Phase
99     # ------------------------------------------------------
100
101         <record id="view_project_phase_form" model="ir.ui.view">
102             <field name="name">project.phase.form</field>
103             <field name="model">project.phase</field>
104             <field name="type">form</field>
105             <field name="arch" type="xml">
106                 <form string="Project Phase">
107                     <group colspan="6" col="6">
108                         <group colspan="6" col="7" >
109                             <field name="name" colspan="4"/>
110                             <field name="project_id" on_change="onchange_project(project_id)" colspan="3"/>
111                             <field name="date_start"/>
112                             <field name="date_end"/>
113                             <field name="duration"/>
114                             <field name="product_uom" nolabel="1"/>
115                         </group>
116                     </group>
117                     <notebook colspan="4">
118                         <page string="Planning of Users">
119                             <field colspan="4" name="user_ids" nolabel="1">
120                                  <tree editable="bottom" string="Project Users">
121                                     <field name="user_id"/>
122                                     <field name="date_start"/>
123                                     <field name="date_end"/>
124                                   </tree>
125                                   <form string="Project Users">
126                                     <field name="user_id"/>
127                                     <field name="date_start" />
128                                     <field name="date_end"/>
129                                   </form>
130                              </field>
131                             <separator string="" colspan="4"/>
132                             <group col="12" colspan="4">
133                                 <field name="state" widget="statusbar" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}' select="1"/>
134                                 <button string="Cancel" name="set_cancel" states="draft,open,pending" icon="gtk-cancel"/>
135                                 <button string="Draft" name="set_draft" states="open" icon="gtk-indent"/>
136                                 <button string="Pending" name="set_pending" states="open" icon="gtk-media-pause"/>
137                                 <button string="Done" name="set_done" states="pending,open" icon="terp-dialog-close"/>
138                                 <button string="Start Phase" name="set_open" states="pending,draft" icon="gtk-execute"/>
139                             </group>
140                         </page>
141                         <page string="Tasks Details">
142                             <field colspan="4" name="task_ids" readonly="1" context="{'default_project_id' :project_id}" nolabel="1">
143                                  <tree string="Project's Tasks">
144                                     <field name="sequence"/>
145                                     <field name="name"/>
146                                     <field name="user_id"/>
147                                     <field name="date_start"/>
148                                     <field name="date_end" />
149                                     <field name="planned_hours" widget="float_time"/>
150                                     <field name="project_id" invisible="1"/>
151                                     <field name="total_hours" sum='Total Hours'/>
152                                     <field name="remaining_hours" widget="float_time" sum="Remaining Hours"/>
153                                     <field name="state"/>
154                                   </tree>
155                              </field>
156                         </page>
157                         <page string="Constraints">
158                            <group colspan="2" col="2">
159                                 <separator string="Constraints" colspan="2"/>
160                                 <field name="constraint_date_start"/>
161                                 <field name="constraint_date_end"/>
162                             </group>
163                             <group colspan="2" col="2">
164                                 <separator string="Displaying settings" colspan="2"/>
165                                 <field name="sequence"/>
166                             </group>
167                            <separator colspan="4" string="Force Assigned Users"/>
168                            <field colspan="4" name="user_force_ids" nolabel="1"/>
169                            <separator colspan="4" string="Previous Phases"/>
170                            <field colspan="4" name="previous_phase_ids" nolabel="1"/>
171                            <separator colspan="4" string="Next Phases"/>
172                            <field colspan="4" name="next_phase_ids" nolabel="1"/>
173                         </page>
174                     </notebook>
175                     <newline/>
176                 </form>
177             </field>
178         </record>
179
180         <record id="view_project_phase_list" model="ir.ui.view">
181             <field name="name">project.phase.list</field>
182             <field name="model">project.phase</field>
183             <field name="type">tree</field>
184             <field name="priority" eval="5"/>
185             <field name="arch" type="xml">
186                 <tree colors="grey:state in ('cancelled','done');blue:state == 'pending'" string="Project Phases">
187                     <field name="name"/>
188                     <field name="project_id" on_change="onchange_project(project_id)"/>
189                     <field name="date_start"/>
190                     <field name="date_end"/>
191                     <field name="duration"/>
192                     <field name="state"/>
193                 </tree>
194             </field>
195         </record>
196
197         <record id="view_project_phase_calendar" model="ir.ui.view">
198             <field name="name">project.phase.calendar</field>
199             <field name="model">project.phase</field>
200             <field name="type">calendar</field>
201             <field eval="2" name="priority"/>
202             <field name="arch" type="xml">
203                 <calendar color="project_id" date_start="date_start" date_stop="date_end" day_length="12">
204                     <field name="name"/>
205                 </calendar>
206             </field>
207         </record>
208
209         <record id="view_project_phase_gantt" model="ir.ui.view">
210             <field name="name">project.phase.gantt</field>
211             <field name="model">project.phase</field>
212             <field name="type">gantt</field>
213             <field eval="2" name="priority"/>
214             <field name="arch" type="xml">
215                 <gantt date_stop="date_end" date_start="date_start" default_group_by="project_id">
216                 </gantt>
217             </field>
218         </record>
219
220         <record id="view_project_phase_search" model="ir.ui.view">
221             <field name="name">project.phase.search</field>
222             <field name="model">project.phase</field>
223             <field name="type">search</field>
224             <field name="arch" type="xml">
225                 <search string="Project Phases">
226                     <group>
227                         <filter string="New" domain="[('state','=','draft')]"  name="current" help="New Phases" icon="terp-check"/>
228                         <filter string="In Progress" name="Progress" domain="[('state','=','open')]" help="In Progress Phases" icon="terp-camera_test"/>
229                         <filter string="Pending" domain="[('state','=','pending')]" help="Pending Phases" icon="terp-gtk-media-pause"/>
230                         <separator orientation="vertical"/>
231                         <field name="name"/>
232                         <field name="project_id">
233                             <filter domain="[('project_id.user_id','=',uid)]" help="My Projects" icon="terp-folder-violet"/>
234                         </field>
235                         <field name="date_start"/>
236                         <field name="date_end"/>
237                     </group>
238                     <newline/>
239                     <group expand="0" string="Group By...">
240                         <filter string="Project" icon="terp-folder-violet" domain="[]" context="{'group_by':'project_id'}" name="project"/>
241                         <separator orientation="vertical"/>
242                         <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
243                         <separator orientation="vertical"/>
244                         <filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}" help="Start Month"/>
245                     </group>
246                 </search>
247             </field>
248         </record>
249
250         <record id="act_project_phase" model="ir.actions.act_window">
251             <field name="name">Project Phases</field>
252             <field name="res_model">project.phase</field>
253             <field name="view_type">form</field>
254             <field name="view_mode">gantt,tree,form,calendar</field>
255             <field name="context">{}</field>
256             <field name="search_view_id" ref="view_project_phase_search"/>
257             <field name="help">A project can be split into the different phases. For each phase, you can define your users allocation, describe different tasks and link your phase to previous and next phases, add date constraints for the automated scheduling. Use the long term planning in order to planify your available users, convert your phases into a series of tasks when you start working on the project.</field>
258         </record>
259
260         <record id="act_project_phase_list" model="ir.actions.act_window">
261             <field name="name">Project Phases</field>
262             <field name="res_model">project.phase</field>
263             <field name="view_type">form</field>
264             <field name="view_mode">tree,form,calendar</field>
265              <field name="context">{}</field>
266             <field name="search_view_id" ref="view_project_phase_search"/>
267         </record>
268
269
270     # ------------------------------------------------------
271     # Project Task
272     # ------------------------------------------------------
273
274         <record id="view_phase_task_form2" model="ir.ui.view">
275             <field name="name">phase.task.form2</field>
276             <field name="model">project.task</field>
277             <field name="type">form</field>
278             <field name="inherit_id" ref="project.view_task_form2"/>
279             <field name="arch" type="xml">
280                 <xpath expr="//field[@name='effective_hours']" position="after">
281                     <field name="phase_id"/>
282                 </xpath>
283             </field>
284         </record>
285         <record id="view_phase_task_search_form" model="ir.ui.view">
286             <field name="name">phase.task.search.form</field>
287             <field name="model">project.task</field>
288             <field name="type">search</field>
289             <field name="inherit_id" ref="project.view_task_search_form"/>
290             <field name="arch" type="xml">
291                 <field name="project_id" position="after">
292                     <field name="phase_id" select="1"/>
293                 </field>
294             </field>
295         </record>
296
297          <record id="view_phase_task_search_form_group" model="ir.ui.view">
298             <field name="name">phase.task.search.form.group</field>
299             <field name="model">project.task</field>
300             <field name="type">search</field>
301             <field name="inherit_id" ref="project.view_task_search_form"/>
302             <field name="arch" type="xml">
303             <filter string="Project" name="group_project_id" icon="terp-folder-violet" domain="[]" context="{'group_by':'project_id'}" position="after">
304                 <filter string="Project Phase" name="group_project_id_phase" icon="terp-folder-violet" domain="[]" context="{'group_by':'phase_id'}"/>
305             </filter>
306             </field>
307         </record>
308
309          <record id="view_phase_task_search_form_tree" model="ir.ui.view">
310             <field name="name">phase.task.search.form.tree</field>
311             <field name="model">project.task</field>
312             <field name="type">tree</field>
313             <field name="inherit_id" ref="project.view_task_tree2"/>
314             <field name="arch" type="xml">
315                 <field name="project_id" position="after">
316                     <field name="phase_id" invisible="1"/>
317                 </field>
318             </field>
319         </record>
320
321     <act_window
322         context="{'search_default_phase_id': [active_id], 'default_phase_id' : active_id}"
323         id="project_phase_task_list"
324         name="Related Tasks"
325         res_model="project.task"
326         src_model="project.phase"
327         view_mode="tree,form"
328         />
329
330     <act_window
331         context="{'search_default_project_id': active_id, 'default_project_id': active_id}"
332         id="act_project_phases"
333         name="Phases"
334         res_model="project.phase"
335         src_model="project.project"
336         view_mode="tree,form"
337         view_type="form"
338         />
339
340     # ------------------------------------------------------
341     # Menu Items
342     # ------------------------------------------------------
343
344         <menuitem action="act_project_phase_list"
345             id="menu_project_phase_list" parent="project.menu_project_management" sequence="2"/>
346
347         <menuitem action="act_project_phase"
348             icon="STOCK_INDENT"
349             id="menu_project_phase"   parent="base.menu_project_long_term" sequence="1"/>
350
351         <menuitem id="menu_resouce_allocation" action="act_resouce_allocation"
352             icon="STOCK_INDENT"
353             parent="base.menu_project_long_term" sequence="2"/>
354
355         <menuitem id="menu_pm_users_project1"
356             name="Resources" parent="project.menu_definitions" sequence="3"/>
357
358         <menuitem id="menu_phase_schedule" name="Scheduling" parent="base.menu_main_pm" sequence="4" groups="project.group_project_user,project.group_project_manager"/>
359         <menuitem action="resource.action_resource_resource_tree" id="menu_view_resource" parent="menu_pm_users_project1" sequence="2"/>
360         <menuitem action="resource.action_resource_calendar_form" id="menu_view_resource_calendar" parent="menu_pm_users_project1" sequence="5"/>
361         <menuitem action="resource.action_resource_calendar_leave_tree" id="menu_view_resource_calendar_leaves" parent="menu_pm_users_project1" sequence="3"/>
362
363     </data>
364 </openerp>